Code Smells

Code Smells

Code smells, or bad smells in code, refer to symptoms in code that may indicate deeper problems. They’re a diagnostic tool used when considering refactoring software to improve its design. Not all code smells should be “fixed” – sometimes code … Continued
Singleton

Singleton

The Singleton design pattern is used to ensure an application never contains more than a single instance of a given type. It is often considered to be an antipattern, since the pattern’s implementation places the responsibility of enforcing the single … 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
Specification Pattern

Specification Pattern

One Domain-Driven-Design solution to the problem of where to place querying, sorting, and paging logic is to use a Specification. The Specification design pattern describes a query in an object. So to encapsulate a paged query that searches for some products, … Continued
State Design Pattern

State Design Pattern

The State Design Pattern is used to model changes in the status or state of an object by delegating rules for such changes to individual objects representing each possible state. You can think of the state pattern as representing a … Continued