O'Reilly logo

Mastering JavaScript Design Patterns by Simon Timms

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Advanced Patterns

I hesitated when naming this chapter Advanced Patterns. This isn't really about patterns that are more complicated or sophisticated than other patterns. It is about patterns that you wouldn't use very frequently. Frankly, coming from a static programming language background, some of them seem crazy. Nonetheless, they are completely valid patterns and are in use in big name projects everywhere.

In this chapter, we'll be looking at:

  • Dependency injection
  • Live postprocessing
  • Aspect-oriented programming
  • Macros

Dependency injection

One of the topics we've been talking about continuously in this book is the importance of making your code modular. Small classes are easier to test, provide for better reuse, and promote better collaboration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required