Tuesday 25 September 2012

What are the SOLID design principles?

SOLID is a acronym typically used in object-oriented design for the five basic principles of programming and design. When applied together the theory goes that the system will be easy to maintain and extend over time.
S - Single Responsibility Principle - An object should have only a single responsibility
O - Open/Closed Principle - Classes should be open for extension
L - Liskov Substitution Principle - objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program
I - Interface Segregation Principle - Class Interfaces should be client specific and fine grained. Classes should expose separate interfaces for different clients where the interface requirements differ. Many client specific interfaces are better than one general purpose interface
D -  Dependency Inversion Principle - Components/Modules should depend upon Abstractions and not on concrete implementations to allow top down design without requiring low level modules first.


No comments:

Post a Comment