Skip to content

Jvls1/solid-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solid-java

SOLID

S - Single responsibility

This principle states that a class should only have one responsibility. Furthermore, it should only have one reason to change.

O - Open for extension. closed for modification

Simply put, classes should be open for extension but closed for modification. In doing so, we stop ourselves from modifying existing code and causing potential new bugs in an otherwise happy application.

L - Liskov substitution

Simply put, if class A is a subtype of class B, we should be able to replace B with A without disrupting the behavior of our program.

I - Interface segregation

It simply means that larger interfaces should be split into smaller ones. By doing so, we can ensure that implementing classes only need to be concerned about the methods that are of interest to them.

D - Dependency inversion

The principle of dependency inversion refers to the decoupling of software modules. This way, instead of high-level modules depending on low-level modules, both will depend on abstractions.

Releases

No releases published

Packages

No packages published

Languages