SSE658.Project_1

Home > SSE 658 > Project 1

Design Patterns
Designing object-oriented software is hard, and designing reusable object-oriented software is even harder. You must find pertinent objects, factor them into classes at the right granularity, define class interfaces and inheritance hierarchies, and establish key relationships among them. Your design should be specific to the problem at hand but also general enough to address future problems and requirements. You also want to avoid redesign, or at least minimize it. Experienced object-oriented designers will tell you that reusable and flexible design is difficult if not impossible to get “right” the first time. Before a design is finished, they usually try to reuse it several times, modifying it each time.

Yet experienced object-oriented designers do make good designs. Meanwhile new designers are overwhelmed by the options available and tend to fall back on non-object-oriented techniques they've used before. It takes a long time for novices to learn what good object-oriented design is all about. Experienced designers evidently know something inexperienced ones don't.

One thing expert designers know not to do is solve problem from first principles. Rather, they reuse solutions that have worked for them in the past. When they find a good solution, they use it again, and again. Such experience is part of what makes them experts.

Design patterns make it easier to reuse successful designs and architectures. Expressing proven techniques as design patterns makes them more accessible to developers of new systems. Design patterns help you choose design alternatives that makes a system reusable and avoid alternatives that compromise reusability. Design patterns can even improve the documentation of class and maintenance of existing systems by furnishing an explicit specification of class and object interactions and their underlying intent.

Examples
Observer pattern