Some of the reasons why Carl finds the use of patterns so important are:
- Patterns are an easy way to refer to a very specific implementation of code while avoiding the additional discussion it would take to get everyone on the same page if the vocabulary used for patterns didn’t exist.
- Patterns can help in overcoming minor issues at an early stage thus preventing them from becoming major issues later on.
- Patterns exemplify a level of sophistication that can provide both performance boosts and reduce memory usage.
- Patterns are established through rigorous testing and, for the most part, helps solving a particular type of problem.
One of the most important aspects of writing maintainable code is being able to notice the recurring themes in that code and optimize them. This is an area where knowledge of design patterns can prove invaluable.
So far Carl has covered the following patterns:
- Module pattern
- Revealing Module pattern
- Singleton pattern
- Observer pattern
- Mediator pattern
- Prototype pattern
- Facade pattern
For each of the patterns Carl describes the purpose and main use cases together with advantages and disadvantages. He has also written a small example for each of them.
His plan for the near future includes the Factory, Mixin and Decorator Patterns.
Carl has contributed to a number of open-source frameworks and libraries e.g. jQuery, WordPress, Backbone and Angular.js.
Keith Adams Dec 06, 2013