Paradigms Flashcards
Structured Programming
Imposes discipline on direct transfer of control
Object Oriented Programming
Imposes discipline on indirect transfer of control
Functional Programming
Imposes discipline upon variable assignment
SOLID Principles
SRP: Single Responsibility Principle OCP: Open Closed Principle LSP: Liskov Substitution Principle ISP: Interface Segregation Principle DIP: Dependency Injection Principle
SRP: Single Responsibility Principle
A module should have one and only one “reason to change” (user, stakeholder, actor)
OCP: Open Closed Principle
A software artifact must be open to extension but closed to modification
LSP: Liskov Substitution Principle
if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e., an object of type T may be substituted with any object of a subtype S) without altering any of the desirable properties of the program (correctness, task performed, etc.).
ISP: Interface Segregation Principle
Clients should not be forced to depend upon interfaces that they do not use.
DIP: Dependency Injection Principle
High-level modules should not depend on low-level modules. Both should depend on abstractions.
Abstractions should not depend on details. Details should depend on abstractions.
Don’t refer to or derive from volatile classes.
Don’t override concrete functions.
Never mention the name of anything concrete or volatile.
The Reuse/Release Equivalence Principle (REP)
The granular of reuse is the granular of release.
The Common Closure Principle (CCP)
Gather together those things that change at the same times and for the same reasons. Separate those things that change at different times or for different reasons.
The Common Reuse Principle (CRP)
Don’t force users of components to depend on things they don’t need.
The Stable Dependencies Principle
Depend in the direction of stability.
The Stable Abstractions Principle
A component should be as abstract as it is stable.
Architecture of a Software System
The shape given to a system in order to facilitate Development, Deployment, Operation and Maintenance. The strategy behind that facilitation is to leave as many options open as possible, for as long as possible.