structural-patterns

Design patterns which are concerned with the structure of code and objects. They generally try to ease relationships between objects by identifying simpler methods of relating them.

Composite - The Daily Design Pattern

This is part of a series of posts demonstrating software design patterns using C# and .NET. The patterns are taken from the book Design Patterns by the Gang of Four. Here's the series index page. What Is This Pattern? The Composite design pattern represents part-whole hierarchies of objects. "Part-whole hierarchies" is a really fancy way of saying you can represent all or part of a hierarchy by reducing the pieces in said hierarchy down to common components. When... Read more >

Decorator - The Daily Design Pattern

This is part of a series of posts demonstrating software design patterns using C# and .NET. The patterns are taken from the book Design Patterns by the Gang of Four. Here's the series index page. What Is This Pattern? The Decorator design pattern seeks to add new functionality to an existing object without changing that object's definition. In other words, it wants to add new responsibilities to an individual instance of an object, without adding those responsibilities to the class... Read more >

Proxy - The Daily Design Pattern

This is part of a series of posts demonstrating software design patterns using C# and .NET. The patterns are taken from the book Design Patterns by the Gang of Four. Here's the series index page. What Is This Pattern? The Proxy pattern provides a surrogate or placeholder object to control access to another, different object. The Proxy object can be used in the same manner as its containing object. The Proxy object can then hide or change data on the... Read more >

Flyweight - The Daily Design Pattern

This is part of a series of posts demonstrating software design patterns using C# and .NET. The patterns are taken from the book Design Patterns by the Gang of Four. Here's the series index page. What Is This Pattern? The Flyweight design pattern is used to create lots of small, related objects without invoking a lot of overhead work in doing so, thereby improving performance and maintainability. The idea is that each Flyweight object has two pieces: The intrinsic state,... Read more >

Bridge - The Daily Design Pattern

This is part of a series of posts demonstrating software design patterns using C# and .NET. The patterns are taken from the book Design Patterns by the Gang of Four. Here's the series index page. What Is This Pattern? The Bridge pattern seeks to decouple an abstraction from its implementation such that both can vary independently. Effectively, the Bridge maintains a reference to both abstraction and implemention but doesn't implement either, thereby allowing the details of both to remain in... Read more >

Adapter - The Daily Design Pattern

This is part of a series of posts demonstrating software design patterns using C# and .NET. The patterns are taken from the book Design Patterns by the Gang of Four. Here's the series index page. What Is This Pattern? The Adapter design pattern attempts to reconcile the differences between two otherwise-incompatible interfaces. This pattern is especially useful when attempting to adapt to an interface which cannot be refactored (e.g. when the interface is controlled by a web service or... Read more >

Facade - The Daily Design Pattern

This is part of a series of posts demonstrating software design patterns using C# and .NET. The patterns are taken from the book Design Patterns by the Gang of Four. Here's the series index page. What Is This Pattern? The Facade pattern is a simple structure laid over a more complex structure. (That's it. Yes, seriously. Facade is one of the simpler patterns.) (You can move on to the next section now. Go on. Shoo!) (Whaaat? You want more details?... Read more >
/* * * DON'T EDIT BELOW THIS LINE * * */ (function () { var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = '//' + disqus_shortname + '.disqus.com/count.js'; (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); }());