- SRP (The Single Responsibility Principle.)
Gather together the things that change for the same reasons. Separate things that change for different reasons.
- OCP (The Open-Closed Principle.)
A Module should be open for extension but closed for modification.
- LSP (The Liskov Substitution Principle.)
A program that uses an interface must not be confused by an implementation of that interface.
- ISP (The Interface Segregation Principle.)
Keep interfaces small so that users don’t end up depending on things they don’t need.
- DIP (The Dependency Inversion Principle.)
Depend in the direction of abstraction. High level modules should not depend upon low level details.
- Absract Factory
Lets you produce families of related objects without specifying their concrete classes.
- Builder
Lets you construct complex objects step by step. The pattern allows you to produce different types and representations of an object using the same construction code.
- Factory Method
Provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.
- Prototype
Lets you copy existing objects without making your code dependent on their classes.
- Singleton
Lets you ensure that a class has only one instance, while providing a global access point to this instance.