Category Archives for ".NET"

The Adapter Pattern in .NET

The Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces. The pattern is also called “Wrapper” because it is usually implemented using the technique of wrapping objects (object composition). There are different situation when the pattern can be […]

Continue reading

7 The Command Pattern in .NET

The Command Pattern encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations. The formal definition of the pattern is quite general and it shows how the pattern is versatile and can be used in many scenarios but the real important thing however is the […]

Continue reading

4 Decorator Pattern – Streams in .NET

The Decorator Pattern allows to attach additional responsibilities to an object dynamically. It is an alternative to subclassing for extending behaviour. Instead of creating a silly example of usage I decided to rely on one of the best example of implementation that is already available in the .NET Framework: the Streams. The following class diagram is […]

Continue reading
1 23 24 25