Repository Pattern

Repository Pattern

The Repository Pattern has gained quite a bit of popularity since it was first introduced as a part of Domain-Driven Design in 2004. Essentially, it provides an abstraction of data, so that your application can work with a simple abstraction … Continued
Adapter Design Pattern

Adapter Design Pattern

The Adapter Design Pattern, also known as the Wrapper, allows two classes to work together that otherwise would have incompatible interfaces.  In this case, this software design pattern maps particularly well to the real-world example of an electrical power adapter, … Continued
Strategy Design Pattern

Strategy Design Pattern

The Strategy Design Pattern allows an object to have some or all of its behavior defined in terms of another object which follows a particular interface.  A particular instance of this interface is provided to the client when it is … Continued
Value Object

Value Object

A Value Object is an immutable type that is distinguishable only by the state of its properties. That is, unlike an Entity, which has a unique identifier and remains distinct even if its properties are otherwise identical, two Value Objects … Continued
Aggregate Pattern

Aggregate Pattern

Aggregates are a design pattern that play a big role in domain-driven development. In many systems, the relationships between entities can become so interwoven that attempting to eager-load an entity and all of its related entities from persistence results in … Continued
Entity

Entity

An Entity is an object that has some intrinsic identity, apart from the rest of its state. Even if its properties are the same as another instance of the same type, it remains distinct because of its unique identity. As … Continued
Null Object Pattern

Null Object Pattern

The Null Object Pattern was described in the Gang of Four’s Design Patterns book. The intent of this pattern is to reduce the need to add checks and special behavior for handling null instances of certain variables that tend to … Continued
Kinds of Models

Kinds of Models

In a Model-View-Controller (MVC) application, the Model is responsible for the application’s state and non-UI specific behavior. In simple applications, there may be just one kind of model class that is used by persistence, presentation, and any business logic. However, … Continued