paulamitjava / SOLID-Principles-and-Design-Patterns

0 stars 0 forks source link

SOLID Principles #1

Open paulamitjava opened 5 years ago

paulamitjava commented 5 years ago

image

  1. A class should have one reason to change
  2. A class can extends without modification
  3. child class must be substitute from its parent class
  4. interfaces specific to clients
  5. Depend on abstractions, not on concrete methods
paulamitjava commented 5 years ago

image

paulamitjava commented 5 years ago

Code Refactoring :

image

  1. Avoid duplicate Code
  2. Do proper garbage collection
  3. use foreach over traditional for loop
  4. use Java 1.8 Stream API and Lamda Expressions
  5. Follow Best Coding Practices (Coding Guideline)