SOLID

This week's reading was basically to understand the SOLID principles. Which are:

  • Single Responsibility: A class or method should only do one thing and one thing only.
  • Open/Closed: Once a base class is done there shouldn't be any modification at all, only extension.
  • Liskov Substitution: You should be able to change a base class for one of its child at any given point when referencing it.
  • Interface Segregation:  Have several small interfaces instead of one big interface.
  • Dependency Inversion: Instead of using concrete classes use interfaces inside classes to avoid depending on a concrete class.
These principles were presented first by Uncle Bob but the name was coined by Michael Feathers. The main theme of this principles is to avoid dependency while programming, to make the code complexity as simple as possible.


Comentarios

Entradas más populares de este blog

We should all be Craftsmen

Hidden Figures - Movie