1. Modularity
- Definition: Breaking down a software system into smaller, manageable, and self-contained modules.
- Benefit: Enhances maintainability and makes it easier to understand, test, and debug the software.
2. Abstraction
- Definition: Hiding complex implementation details and showing only the necessary features of a system.
- Benefit: Simplifies the design and usage of complex systems by focusing on high-level functionalities.
3. Encapsulation
- Definition: Restricting direct access to some of the object's components and protecting the integrity of the data.
- Benefit: Helps maintain the internal state of an object and prevents unintended interference.
4. Separation of Concerns
- Definition: Dividing a software system into distinct features that overlap in functionality as little as possible.
- Benefit: Improves readability and maintainability by isolating different aspects of the software.
5. Single Responsibility Principle
- Definition: A class or module should have only one reason to change, meaning it should only have one job or responsibility.
- Benefit: Simplifies code, makes it more robust, and reduces the risk of unintended side effects.
6. Open/Closed Principle
- Definition: Software entities (classes, modules, functions) should be open for extension but closed for modification.
- Benefit: Enhances flexibility and reduces the risk of breaking existing code when adding new features.
7. Liskov Substitution Principle
- Definition: Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program.
- Benefit: Ensures that a derived class can be substituted for its base class without causing errors.
8. Interface Segregation Principle
- Definition: Clients should not be forced to depend on interfaces they do not use.
- Benefit: Reduces the impact of changes and increases flexibility by creating smaller, more specific interfaces.
9. Dependency Inversion Principle
- Definition: High-level modules should not depend on low-level modules; both should depend on abstractions. Abstractions should not depend on details; details should depend on abstractions.
- Benefit: Reduces the dependency on concrete implementations and enhances the flexibility and testability of the system.
10. DRY (Don't Repeat Yourself)
- Definition: Avoid duplication of code by abstracting common functionality into reusable components.
- Benefit: Reduces redundancy, minimizes errors, and makes code easier to maintain.
11. YAGNI (You Aren't Gonna Need It)
- Definition: Do not add functionality until it is necessary.
- Benefit: Prevents feature creep, reduces complexity, and helps maintain focus on the current requirements.
12. KISS (Keep It Simple, Stupid)
- Definition: Strive for simplicity in design and implementation.
- Benefit: Simplifies maintenance and reduces the likelihood of bugs and errors.
13. Law of Demeter (Principle of Least Knowledge)
- Definition: A module should not know about the internal details of the objects it interacts with.
- Benefit: Reduces dependencies and increases the modularity of the code.
14. Code Review and Continuous Integration
- Definition: Regularly review code and integrate changes frequently.
- Benefit: Ensures code quality, detects issues early, and facilitates collaboration among team members.
15. Testing and Documentation
- Definition: Write automated tests and maintain comprehensive documentation.
- Benefit: Ensures the correctness of the software, makes it easier to understand and maintain, and provides a reference for future development.
Hope this information helps you 👍
0 Comments