Skip to content

ajbatac/SOLID-Principles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

SOLID Principles (A Simple Version)

S - Single Responsibility

• One class = one job • Each class should have only one reason to change

O - Open/Closed

• Open for extension, closed for modification • Add new features without changing existing code

L - Liskov Substitution

• Child classes should work wherever parent classes work • Subtypes must be substitutable for their base types

I - Interface Segregation

• Many small, specific interfaces > few large, general ones • Don't force classes to implement methods they don't need

D - Dependency Inversion

• Depend on abstractions, not concrete implementations • High-level modules shouldn't depend on low-level modules

About

SOLID is a set of five programming principles for better code design: Single Responsibility (one class, one job), Open/Closed (extendable, not modifiable), Liskov Substitution (child classes replace parents), Interface Segregation (small interfaces), and Dependency Inversion (depend on abstractions).

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors