Software Engineering Flashcards
What are the 5 principles of SOLID
Single responsibility Open-closed Liskov substitution Interface segregation Dependency inversion
Single responsibility principle
SOLID principle described by:
an object should have only a single responsibility.
Open/closed principle
SOLID principle described by:
“software entities … should be open for extension, but closed for modification”.
Liskov substitution principle
SOLID principle described by:
“objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program”. See also ‘design by contract’.
Interface segregation principle
SOLID principle described by:
“many client specific interfaces are better than one general purpose interface.”
Dependency inversion principle
SOLID principle described by:
one should “Depend upon Abstractions. Do not depend upon concretions.” Dependency injection is one method of following this principle.
What does GRASP stand for?
General Responsibility Assignment Software Patterns (or Principles)
The different patterns and principles used in GRASP
- Controller
- Creator
- Indirection
- Information Expert
- High Cohesion
- Low Coupling
- Polymorphism
- Protected Variations
- Pure Fabrication