Lets us start with the basics of OOAD. The idea of introducing this post is just to revise the concepts which are mandatory to be used in any of the software solution. Programmer sometimes get reluctant to these fundamentals leading to the regression and re-writing of the code.
There are 5 thumb-rules (called as SOLID) :
Interface segregation and
Let us see these principles in details
- Single Responsibility Principle : http://wp.me/s3IrXg-srp
- Open Closed Principle: http://wp.me/s3IrXg-ocp
- Liskov Substitution Principle: http://wp.me/p3IrXg-34
- Interface Segregation principle: http://wp.me/s3IrXg-isp
- Dependency inversion principle: http://wp.me/p3IrXg-3q
These principles are the backbone of software programming with object oriented approach. The use of these principles has to be decided at the time of design phase which can then be moulded into the actual code implementation. However all these fundamentals can be achieved by proper use of the OOPs methodologies like:
- Data encapsulation
- Polymorphism and
- Code re-usability
The use of the design principle ensures us that the logic is not rewritten and would be open for accommodating new features but also restricts the user to modify the existing system which might collapse the operational module. These code-rules are further extended to design a prototype to solve a particular problem statement which are also known as design patterns.