Lecture#09: Object Design and Design Patterns
In this lecture, we start to learn object design and design patterns.
Object design is about identifying additional solution-domain objects and refining existing objects. Object design includes the following activities:
- Reuse–use inheritance and composition/delegation, identify off-the-shelf framework, and apply design patterns
- Service specification–describe interface of classes precisely
- Restructuring–transform the object model to increase code reuse or meet other design goals such as readability and maintainability
- Optimization–address performance goals such as response time and throughput
Design patterns take the reuse concept a step further. A design pattern encapsulates a specific way that a number of different objects work together. Different design patterns can be applied in certain situations to achieve specific benefits.
Your actions before next class: Read Chapter 8 Object Design: Reusing Pattern Solutions.
* * *
1 Comment(s)
Sorry, the comment form is closed at this time.
The Open-Closed principle is an important principle for a good object-oriented design (OOD).
It states that well-designed code should be open for extension and closed for modification. In other words, in a well-designed program, new functionalities are added by adding new code rather than by modifying already working code. It is the foundation for building software that is maintainable and reusable. This principle was coined by Bertrand Meyer in his book titled Object Oriented Software Construction. The second edition of this book is introduced here in Eiffel Software.
An article obtained from Object Mentor give a very good introduction on the Open-Closed principle. Here is the direct link to this article: The Open-Closed Principle (PDF file, 69 KB).