The thought of Design Pattern based development has been put
forward for quite a few years, but just caused the attention of the forefront
developers in recent years, which can be proved with the numerous data from the
Internet. The various design patterns are based upon the object-oriented
programming, so they are not easy to grasp. As you may imagine, only through
continuous software development practice can we finally apply various design
patterns flexibly.
Design patterns are not any language specific, so equally
apply in the JavaScript area, only with very few materials focusing on this
aspect. This article based upon common JavaScript examples on the client side
and discussed six kinds of typical design patterns, i.e. Singleton, Factory
Method, Decorator, Observer, Facade, and Command.