Introduction

Classes, like objects and functions, are the fundamental building blocks from which we create programs. As programs grow, it becomes more difficult to efficiently and systematically define relationships between entities. When the relationships between data and functionality grow complicated, we can use classes and other objects to organize them. But what do we do when classes and objects proliferate?

Design patterns can be a helpful guide. Useful design patterns are refined from practical implementation. These patterns are intended to solve patterns of a given shape in predictable ways. When properly implemented, they form a contract of expected behaviors. This predictability and regularity (with other implementations of the ...

Get ECMAScript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.