core design principles
October 9, 2012 2 Comments
MUST REMEMBER 4 ALL PROGRAMMERS
– Encapsulate what varies
– Favor composition over inheritance
– Program to an interface, not implementations
– Strive for loosely coupled designs between objects that interact (Observer)
– Classes should be open for extension and closed for modification (Decorator)
– Dependency Inversion Principle: Depend on abstraction. Do not depend on concrete classes. This principle suggests that our high level components should not depend on low level components instead both should depend on abstractions. (Command Pattern)
– Principle of least knowledge: Only talk to your friends (Façade Pattern)
– Hollywood Principle: Don’t call us, we will call you. (Template, Factory Method, Observer Patterns)
– A class should have only one reason to change (Iterator Pattern, State Pattern)
Thanks..
It is very useful for every developer
🙂