Do you know the common Design Patterns? (Part 1)
28/06/2012 5:33 AM by
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.
Figure: Choose patterns wisely to improve your solution architecture
||Inversion of Control
||Control of the object coupling is the responsibility of the caller, not the class.|
||Dependencies are "injected" into the dependent object rather than the object depending on concretions.|
||Object creation is handled by a "factory" that can provide different concretions based on an abstraction.|
||Instantiation of an object is limited to one instance to be shared across the system.|
||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.|
||Model View Controller
||An architectural pattern separating domain logic (Controller) from how domain objects (Models) are presented (View).|
||Model View Presenter
||An architectural pattern deriving from MVC where the View handles UI events instead of the Controller.|
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.
Do you feel this rule needs an update?