Design Principles Flashcards
The main goal of this principle is to minimize the effect caused
by changes
Encapsulate What Varies (Identify the aspects of your application that vary and
separate them from what stays the same.)
What is encapsulation on method level?
You can extract the logic which will change into a separate
method, hiding it from the original method
What is encapsulation on class level?
You can extract the logic which will change into a separate
class and use this class
The main goal of this principle is to depend on abstraction rather than concrete classes
Program to an Interface, not anImplementation
The main goal of this principle is to reduce inheritance herarhy and allow to replace it in runtime
Favor Composition Over Inheritance