This series of articles will identify and describe the more common design principle of Object Orientated Application Development. It is with the understanding and judicious use of these principle that you will be able to developing more flexible, maintainable and extensible software systems, while avoiding common costly mistakes.
Definition: Principles
- an accepted or professed rule of action or conduct: a person of good moral principles.
- a fundamental, primary, or general law or truth from which others are derived: the principles of modern physics.
- principles, a personal or specific basis of conduct or management: to adhere to ones principles.
- guiding sense of the requirements and obligations of right conduct: a person of principle.
- an adopted rule or method for application in action: a working principle for general use.
Design principles are not laws but guides and should be treated as such. The understanding of these principles and when to use them is as equally important as to when not to use them. Over use of one or more design principles will create software with needles complexity and be un-maintainable.
Class Design
- Single Responsibility Principle (SRP)
- Open-Closed Principle (OCP)
- The Law Of Demeter (LOD)
- Dependency Inversion Principle (DIP)
- Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Separation of Concerns (SOC)
- Principle of Least Surprise
- Hollywood Principles
- Don’t Repeat Yourself (DRY)
Package Design
- Reuse/Release Equivalency Principle (REP)
- Common Reuse Principle (CRP)
- Common Closure Principle (CCP)
- Acyclic Dependencies Principle (ADP)
- Stable Dependencies Principle (SDP)
- Stable Abstractions Principle (SAP)
Conclusion
Design Principles are tools and techniques that every developer should learn and master. With the use of these principles, better, faster, extensible and more maintainable software and computer systems can be constructed. On the other hand, the use of these design principles will not guarantee success in software development, but it does give you an advantage. This list of principles is not a complete list and will be updated when other principles come to my attention.
Links
For further reading:
Agile Principles, Patterns, and Practices in C#
Head First Object Orientated Analysis and Design