Understanding the SOLID Principles
The article is about the “SOLID principles”, which are five important principles of object-oriented programming and design and which recurring theme is the dependency’s avoidance, these are: Single Responsibility Principle: this statement says that a class should have just one responsibility, and that it might be just changed if there’s exactly one reason Open/Closed Principle: here we talk about that a class or function should be open for extension but closed for modification Liskov Substitution Principle: ability to work with a child class inside a function that is expecting the base class Interface Segregation Principle: avoid writing giant interfaces that classes may not need or want Dependency Inversion Principle: instead of writing code that refers to actual classes, better write code that refers to interfaces or abstract classes These practices are interesting as the refactoring or pattern practices, the reason makes sense after you read the description ...