Profile
Achievement
timsommer's Recent Snippets
- All /
« Prev 1 Next »
In this section we're going to explore the decorator - a structural design pattern that promotes code reuse and is a flexible alternative to subclassing. This pattern is also useful for modifying existing systems where you may wish to add additional...
0
744
posted 12 years ago by timsommer
The Factory Pattern suggests defining an interface for creating an object where you allow the subclasses to decide which class to instantiate. This pattern handles the problem by defining a completely separate method for the creation of objects and w...
2
736
posted 12 years ago by timsommer
When we put up a facade, we present an outward appearance to the world which may conceal a very different reality. This was the inspiration for the name behind the facade pattern. The facade pattern provides a convenient higher-level interface to a l...
0
661
posted 12 years ago by timsommer
The Command pattern aims to encapsulate method invocation, requests or operations
into a single object and gives you the ability to both parameterize and pass method calls
around that can be executed at your discretion. In addition, it enables you...
0
735
posted 12 years ago by timsommer
In software engineering, a mediator is a behavioral design pattern that allows us to
expose a unified interface through which the different parts of a system may communicate. If it appears a system may have too many direct relationships between modu...
0
746
posted 12 years ago by timsommer
The module pattern was originally defined as a way to provide both private and public encapsulation for classes in conventional software engineering.
In JavaScript, the module pattern is used to further emulate the concept of classes in such a way t...
0
706
posted 12 years ago by timsommer
In object literal notation, an object is described as a set of comma-separated name/
value pairs enclosed in curly braces ({}). Names inside the object may be either strings or identifiers that are followed by a colon. There should be no comma used...
0
622
posted 12 years ago by timsommer
In conventional software engineering, the singleton pattern can be implemented by
creating a class with a method that creates a new instance of the class if one doesn't In conventional software engineering, the singleton pattern can be implemented b...
1
809
posted 12 years ago by timsommer
In conventional software engineering, the singleton pattern can be implemented by
creating a class with a method that creates a new instance of the class if one doesn't exist. In the event of an instance already existing, it simply returns a referen...
1
858
posted 12 years ago by timsommer