Posts

Showing posts from October, 2022

SOLID Principles

SOLID Principles To identify when and where to apply the SOLID principles, it's important to understand the core principles and their purposes. Here are some guidelines to help you identify their application: Single Responsibility Principle (SRP): Identify distinct responsibilities or reasons for change within your system. If a class or module has multiple responsibilities, consider separating them into separate classes or modules. Look for classes or modules that have more than one reason to change and consider refactoring them. Open-Closed Principle (OCP): Identify components or modules that should be open for extension but closed for modification. Consider using abstraction, interfaces, or inheritance to allow for extension without modifying existing code. Look for areas where you anticipate future changes or variations and design them to be easily extended without modifying existing code. Liskov Substitution Principle (LSP): Assess whether derived classes ca