🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Programming Concepts Intermediate

What is SOLID Principles?

Five design principles for writing maintainable, flexible object-oriented code: Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.

S: Single Responsibility — a class should have one reason to change. O: Open-Closed — open for extension, closed for modification. L: Liskov Substitution — subtypes must be substitutable for their base types. I: Interface Segregation — prefer small, focused interfaces. D: Dependency Inversion — depend on abstractions, not concretions.

SOLID principles reduce coupling, increase cohesion, and make code easier to test, maintain, and extend. They are the foundation of clean object-oriented design and are relevant across all OOP languages.

Related Terms

Hash Table
A data structure that maps keys to values using a hash function, providing average O(1) time complexity for lookups, insertions, and deletions.
Memoization
An optimization technique that caches function results for given inputs, avoiding redundant computations for repeated calls.
Unit Testing
Testing individual components or functions of a program in isolation to verify they work correctly.
Closure
A function that captures and retains access to variables from its enclosing scope, even after that scope has finished executing.
Code Smell
A surface indication in code that usually corresponds to a deeper problem in the system, suggesting the need for refactoring.
Garbage Collection
An automatic memory management process that identifies and reclaims memory no longer in use by a program.
View All Programming Concepts Terms →