creational-patterns

Software design patterns which deal with the creation of objects and instances of those objects.

Builder - 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 Builder pattern separates the construction of an object from its representation so that the same construction process can create different representations. The general idea is that the order in which things happen when an object is instantiated will be the... Read more >

Singleton - 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? Singleton is a Creational design pattern in which a class is guaranteed to only ever have exactly one instance, with that instance being globally accessible. What this means is that the pattern forces a particular object to not have an accessible... Read more >

Prototype - 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? Prototype is a Creational design pattern in which objects are created using a prototypical instance of said object. This pattern is particularly useful for creating lots of instances of an object, all of which share some or all of their values.... Read more >

Abstract Factory - 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 Abstract Factory Pattern (AKA Factory of Factories) is a Creational pattern in which interfaces are defined for creating families of related objects without specifying their actual implementations. When using this pattern, you create factories which return many kinds of related... Read more >

Factory Method - 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 Factory Method pattern is a Creational pattern which defines an interface for creating an object, but doesn't specify what objects the individual implementations of that interface will instantiate. All that means is that when using this pattern, you can define... Read more >