- Published on
SOLID Principle
- Authors
- Name
- Khánh
What is OOD?
OOD stands for Object-Oriented Design. OOD is a method focus on simulation the object in a software system. In simple terms, OOD is a way to organize code for better logic or performance by the ways:
- Divide the system into the seperate objects: each object stands for one specific instance or method in the system.
- Identify the attributes and methods of each object.
- Establish relationships between objects so that they can interact and collaborate with each other.
OOD Pros
- Easy to maintain and extends
- Reusable code
- Easy debug
- Simulation real systems
OOD Cons
- More complexity
- Require an experience developer
- Code longer
What is SOLID?
SOLID stands for five principles of object-oriented design published by Robert C. Martin. The purpose of these principles is to make the code easy to understand, maintainable, and extendable.
Five principles are:
- Single responsibility principle (SRP)
- Open-close principle (OCP)
- Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Dependency Inversion Principle (DIP)