Skip to content

Phoenix1978/Solid-demonstrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOLID principles demonstrator

This project aims to demonstrate the SOLID principles :

The SOLID principles (https://en.wikipedia.org/wiki/SOLID) aim on helping for software development more reliable and more robust

Acronym meaning

Single-responsibility

A class, method or function should only have a single responsibility
  prevents unexpected side-effects of future changes, much easier to explain, understand and implement

Open–closed

An application entity (class, function, module ...) must be open to extension, but closed to modification
      avoid affecting non-wanted code 

Liskov substitution

Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program (do not change superclass behavior in subtype)
             loosely dependent to each other and encourages code reusability

Interface segregation

Many client-specific interfaces are better than one general-purpose interface
            Avoid huge interface with bad readability

Dependency inversion

Depend on abstractions, not implementations
            Avoid dependencies that may change

General cons :

Sometimes it can be felt more complex
More objects (classes / functions /methods)

Other acronym like this one: DRY: Don't Repeat Yourself (make code reusable, divide logic) KISS: Keep It Simple, Stupid (choose simplest way to code) YAGNI: You aren't gonna need it (don’t add code until deemed necessity)

How it works

This project was done on IntelliJ with Maven, so simply import the project and launch the src\main\java\Tester.java

To be useful, it is worthy to follow as much the code and logs meanwhile

Enjoy !

About

Solid principles demonstrator in Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages