SOLID Design Principles
Single Responsibility Principle (SRP)
SRP states that every object should only have one reason to change and a single focus of responsibility.
Open-Closed Principle (OCP)
A class should be open for extension but closed for modification.
Liskov Substitution Principle (LSP)
You should be able to use any derived class in place of a parent class and have it behave in the same manner without modification.
Interface Segregation Principle (ISP)
Clients should not be forced to depend upon interfaces that they do not use. Make fine grained interfaces that are client specific.
Dependency Inversion Principle (DIP)
Depend on abstractions, not on concrete classes.
Resources
Objectmentor has some good resources on design principles -
No comments:
Post a Comment