Skip to content

JonathanM2ndoza/Spring-Boot-SOLID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOLID Principles - Example in Java

Single Responsibility Principle (SRP)

The single responsibility principle states that every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility. – Wikipedia

Open/Closed Principle (OCP)

The open/closed principle states “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification”; that is, such an entity can allow its behaviour to be extended without modifying its source code. – Wikipedia

Liskov Substitution Principle (LSP)

Let O(x) be a property provable about objects x of type T. Then O(y) should be true for objects y of type S where S is a subtype of T. – Wikipedia

Interface Segregation Principle (ISP)

The interface-segregation principle states that no client should be forced to depend on methods it does not use. – Wikipedia

Dependency Inversion Principle (DIP)

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. – Wikipedia

About

Example SOLID Principles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages