Skip to content
Open

Typo #16

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

As a language, JavaScript is agnostic about architecture. It does not have Java's heavyweight class hierarchy. It does not have Smalltalk's UI framework. Thus, it is possible to build your own monolithic architecture that dictates the API of all objects that fit into it and wires them together.

It's also possible to design around lots of smaller componets that "compose." This is the principle behind JavaScript [Algebras](#algebra), to create collections of functions or objects and to write operations that compose new itesm from existing items.
It's also possible to design around lots of smaller componets that "compose." This is the principle behind JavaScript [Algebras](#algebra), to create collections of functions or objects and to write operations that compose new items from existing items.

We'll see those ideas play out in coming sections. For example, [Predicate Dispatch](#predicate-dispatch) is one way to compose new functions from smaller functions that each handle one "case" for an algorithm. [Encapsulation and Composition of Metaobjects](#encapsulation-and-composition) composes metaobjects (like prototypes) together our of smaller, independent metaobjects with focused responsibilities.

The key to making composeability work well is always to have parts that are as independent of each other as possible. This makes combining and recombining them easy and practical.

While heavyweight OO is a valid approach, our focus in this book will be on lightweight components that compose, an approach that plays to JavaScript's strengths and makes it easy to pick as few or as many of the techniques we discuss for a particular project.
While heavyweight OO is a valid approach, our focus in this book will be on lightweight components that compose, an approach that plays to JavaScript's strengths and makes it easy to pick as few or as many of the techniques we discuss for a particular project.