Tag: solid
All the articles with the tag "solid".
SOLID: Dependency Inversion Principle
Published: at 03:20 PMThe Dependency Inversion Principle (DIP) promotes decoupling by ensuring high-level modules depend on abstractions, not low-level details. This leads to more flexible, maintainable, and testable code, often implemented through Dependency Injection.
SOLID: Interface Segregation Principle
Published: at 05:33 PMThe Interface Segregation Principle (ISP) advises that objects should only depend on the interfaces they actually use, promoting smaller, cohesive interfaces over large, cumbersome ones. By adhering to ISP, you reduce coupling, enhance code maintainability, and improve testability, ensuring that clients aren't burdened with unnecessary methods.
SOLID: Liskov Substitution Principle
Published: at 08:05 PMThe Liskov Substitution Principle (LSP) ensures subtypes can replace their base types without issues. Violations occur when subtypes change expected behavior, often signaled by type checks or unimplemented methods. To follow LSP, ensure subtypes fully support the base type's behavior.
SOLID: Open/Closed Principle
Published: at 03:49 PMThe Open/Closed Principle (OCP) states that software entities should be open for extension but closed for modification. This principle advocates designing systems so that new functionality can be added without altering existing code, which helps maintain stability and reduces the risk of introducing bugs.