Do you know the common Design Patterns? (Part 1)
  v7.0 Posted at 28/06/2012 5:33 AM by Tiago Araujo

Design patterns are useful for ensuring common design principles are being followed.  They help make your code consistent, predictable, and easy to maintain.

​There are a very large number of Design Patterns, but here are a few important ones.

​IOC ​Inversion of Control Control of the object coupling is the responsibility of the caller, not the class.
​DI Dependency Injection Dependencies are "injected" into the dependent object rather than the object depending on concretions.
​Factory ​Factory Pattern ​Object creation is handled by a "factory" that can provide different concretions based on an abstraction.
​Singleton ​Singleton Pattern ​Instantiation of an object is limited to one instance to be shared across the system.
​Repository ​Repository Pattern ​A repository is used to handle the data mapping details of CRUD operations on domain objects.
​Unit of Work ​Unit of Work Pattern ​A way of handling multiple database operations that need to be done as part of a piece of work.
​MVC ​Model View Controller ​An architectural pattern separating domain logic (Controller) from how domain objects (Models) are presented (View).
​MVP ​Model View Presenter ​An architectural pattern deriving from MVC where the View handles UI events instead of the Controller.
Figure: Choose patterns wisely to improve your solution architecture

It is assumed knowledge that you know these design patterns. If you don't, read about them on the sites above or watch the PluralSight videos on Software Patterns.

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address: