Blog posts with tag "design-patterns"

Other Design Patterns

February 08, 2010

Here are some remaining software design patterns I missed out from the set of examples I gave. Adapter A good example of the Adapter pattern…

C# Design Patterns: the Façade pattern

April 14, 2009

Summary Access multiple classes in one simple to use class. This class is often static too. Example A common use of the Façade pattern is…

C# Design Patterns: the State pattern

March 09, 2009

Summary Like a finite state machine but implemented using a class for each state, rather than an enumeration and/or switch statement…

C# Design Patterns: the Observer pattern

February 28, 2009

Summary Very similar to the Mediator pattern. The only difference is the ‘clients’, or the Observers as they are now called, don’t broadcast…

C# Design Patterns: the Mediator pattern

February 10, 2009

Summary This pattern is best illustrated in code as the source describes it a lot more concisely than in prose. One central class (the…

C# Design patterns: the Strategy pattern

January 28, 2009

Summary Multiple classes implement an interface, handling an algorithm in a different way. Example Sorting is the clearest working example…

C# Design Patterns: the Iterator pattern

January 23, 2009

Summary Iterate through a list of items, with an enumerator class ordering the set/list before it is iterated through. Example Iterators are…

C# Design Patterns: the Singleton pattern

January 13, 2009

Summary A class that only allows one instance of itself, which is accessed via a static property. Example usage The commonest example is an…

C# Design Patterns: the Abstract Factory Pattern

January 02, 2009

Summary The abstract factory is the base class of all factory classes, but is responsible for creating instances of the classes that are…

C# Design Patterns: the Factory pattern

December 03, 2008

Summary One class (the factory) creates instances of other classes which all implement the same interface or subclass a specific class. The…

C# Design Patterns

September 02, 2008

Contents Factory Abstract Factory Singleton Strategy Iterator Mediator Observer State Facade The others Introduction Download example…