Awesome
☕⚛ SOLID principles examples in Java
<img src="http://codely.tv/wp-content/uploads/2016/05/cropped-logo-codelyTV.png" align="left" width="192px" height="192px"/> <img align="left" width="0" height="192px" hspace="10"/>⚛ Learn SOLID principles by examples
ℹ️ Introduction
This is a repository intended to serve as illustrative examples for the course "Principios SOLID Aplicados" (Spanish).
🏁 How To Start
- Install Java 8:
brew cask install corretto8
- Set it as your default JVM:
export JAVA_HOME='/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home'
- Clone this repository:
git clone https://github.com/CodelyTV/java-solid-examples
. - Execute some Gradle lifecycle tasks in order to check everything is OK:
- Create the project JAR:
make build
- Run the tests and plugins verification tasks:
make test
- Create the project JAR:
- Start playing around with the different examples of each SOLID principle. You have explanations here and in the test code 🙂
☝️ How to update dependencies
- Gradle (current version: 5.6 - releases):
./gradlew wrapper --gradle-version=5.6 --distribution-type=bin
or modifying the gradle-wrapper.properties - JUnit (current version: 5.5.1 - releases):
build.gradle:11
💡 Related repositories
☕ Java
🐘 PHP
🧬 Scala
Liskov Substitution Principle (LSP)
- Package:
tv.codely.solid_principles.liskov_substitution_principle
- Production code
- Tests code with explanations
Dependency Inversion Principle (DIP)
- Package:
tv.codely.solid_principles.dependency_inversion_principle
- Production code
- Tests code with explanations
About
This hopefully helpful examples have been implemented by CodelyTV and contributors.
Pull Requests are welcome. We would suggest oppening an issue before actually coding your Pull Request in order to ask for feedback 🙂
License
The MIT License (MIT). Please see License for more information.