• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/12

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

12 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)

Solid Principles

A set of 5 design principles in object-oriented programming that aim to create more scalable and maintainable software.

Solid Principles

S - Single Responsibility Principle


O - Open/Closed Principle


L - Liskov Substitution Principle


I - Interface Segregation Principle


D - Dependency Inversion Principle

Single Responsibility Principle

A class should only have one reason to change. Meaning, it should only have one responsibility.

SRP

Open Closed Principle

A class should be open to extensions, but closed for modifications.



You should be able to add new functionalities without changing existing code

OCP

Liskov Substitution Principle

Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program.


Simply put, any instance of Foo can be replaced with any instance of Bar which is derived from Foo and the program will work the same very way.

LSP

Interface Segregation Principle

Clients should not be forced to depend on interfaces they do not use.



It encourages small specific interfaces.

ISP

Dependency Inversion Principle

High-level modules should not depend on low-level modules.


Both should depend on abstractions.


It promotes the use of interfaces and abstractions.


Dependency Injection (DI) is a common technique used to implement DIP. DI involves providing dependencies (usually via constructor parameters) to a component rather than letting the component create its own dependencies.

DIP