This blog series will gather summary of all the software architecture design principles under one roof. Intention is to keep in touch with these principles.
First one is called “SOLID”, which is combination of five basic designing principles,
Single Responsibility Principle
There should never be more than one reason for class to change.
Open – Closed Principle
Software Entities (Classes, Modules, Functions, etc.) should be open for extension but closed for modifications.
Liscov Substitution Principle
Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it.
Interface Segregation Principle
Clients should not be forced to depend upon interfaces that they don’t use.
Dependency Inversion Principle
A. High level modules should not depend on low level module. Both should depend on abstraction. Both should depend on Abstraction.
B. Abstraction should not depend on details. Details should depend on Abstraction.
Other important principles are
DRY (Don’t Repeat Yourself)
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
Aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures.
YAGNI – You ain’t gonna need it
Always implement things when you actually need them, never when you just foresee that you need them.
KISS – Keep it simple, Stupid!
Most systems work best if they are kept simple rather than made complex, therefore simplicity should be a key goal in design and unnecessary complexity should be avoided.
Seven Principles Of Software Development
- The Reason It All Exists
- KISS (Keep It Simple, Stupid!)
- Maintain the Vision
- What You Produce, Others Will Consume
- Be Open to the Future
- Plan Ahead for Reuse