Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

SOLID Principles Cheat Sheet

SOLID Principles Cheat Sheet

Back to Software Engineering
Updated 2026-03-18
Next Topic: System Design Fundamentals Cheat Sheet

SOLID is an acronym for five object-oriented design principles introduced by Robert C. Martin (Uncle Bob) that guide developers toward creating maintainable, scalable, and flexible software systems. These principles address dependency management and separation of concerns, helping to reduce coupling, increase cohesion, and make code easier to test, modify, and extend. While rooted in object-oriented programming, SOLID has proven relevant across paradigmsβ€”from microservices architecture to modern TypeScript applications. Understanding when and how to apply these principles pragmatically, without over-engineering, is key to writing professional-grade code that withstands change.

What This Cheat Sheet Covers

This topic spans 13 focused tables and 78 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Core SOLID PrinciplesTable 2: Single Responsibility Principle (SRP) β€” DetailsTable 3: Open/Closed Principle (OCP) β€” DetailsTable 4: Liskov Substitution Principle (LSP) β€” DetailsTable 5: Interface Segregation Principle (ISP) β€” DetailsTable 6: Dependency Inversion Principle (DIP) β€” DetailsTable 7: Common Violations and Code SmellsTable 8: Benefits of SOLID PrinciplesTable 9: SOLID and Design PatternsTable 10: Practical Considerations and TradeoffsTable 11: SOLID in Modern ContextsTable 12: Relationship to Other PrinciplesTable 13: Historical Context and Authorship

Table 1: Core SOLID Principles

PrincipleExampleDescription
Single Responsibility Principle (SRP)
class User { login() {...} }
class UserRepository { save() {...} }
β€’ A class should have one and only one reason to change
β€’ it handles a single responsibility or job.
Open/Closed Principle (OCP)
interface Shape { area(): number }
class Circle implements Shape {...}
β€’ Modules should be open for extension but closed for modification
β€’ add features via new code, not by changing existing code.
Liskov Substitution Principle (LSP)
Rectangle r = new Square();
r.setWidth(5); r.setHeight(10);
β€’ Subtypes must be substitutable for their base types without altering program correctness
β€’ subclasses must honor parent contracts.

More in Software Engineering

  • Software Resilience Patterns Cheat Sheet
  • System Design Fundamentals Cheat Sheet
  • _Dependency_Injection_Patterns
  • Database Migration Strategies for Development Teams Cheat Sheet
  • Integration Testing Patterns and Strategies Cheat Sheet
  • Software Architecture Fitness Functions Cheat Sheet
View all 47 topics in Software Engineering