GofPatterns GofPatterns

Designing Software  «Prev  Next»
Lesson 8

Design Patterns Course - Conclusion

This module discussed what design patterns are, and how they can help you write more flexible, reusable, maintainable code.
You have learned how to:
  1. Use creational patterns like Singleton and Factory Method to create objects without specifying the exact class that's created at compile time.
  2. Use behavioral patterns to replace complicated flow control with simple connections between objects.
  3. Use behavioral patterns to encapsulate algorithms and choose different algorithms at run time.
  4. Use structural patterns to build complex yet easy-to-use amalgams from individual objects.
  5. Use abstract classes to write code that speaks to an interface rather than a class so that polymorphism is preserved.
  6. Enhance the flexibility, adaptability, and maintainability of your code by using object patterns to replace inheritance with composition and delegation.

Gang of Four Patterns
Cataloging design patterns is important since it gives us standard names and definitions for the techniques we use. If we do not study design patterns in software, we will not be able to improve them, and it will be harder to come up with new ones. This website contains some of the most common design patterns that expert object-oriented designers use. People hear and learn about them solely by word of mouth or by studying existing systems. Before Object Oriented Programming became mainstream, people would write down the design patterns they use. I hope this will mark the start of a movement to document the expertise of software practitioners. This module discussed the impact we think design patterns will have, how they are related to other work in design, and how you can get involved in finding and cataloging patterns.

What to Expect from Design Patterns

Here are several ways in which the design patterns discussed on this website can affect the way you design object-oriented software, based on our day-to-day experience with these patterns.

A Common Design Vocabulary

Studies of expert programmers for conventional languages have shown that knowledge and experience is not organized simply around syntax but in larger conceptual structures such as
  1. algorithms,
  2. data structures and
  3. idioms.
Designers probably do not think about the notation they are using for recording the design as much as they try to match the current design situation against plans, algorithms, data structures, and idioms they have learned in the past.
Computer scientists name and catalog algorithms and data structures, but we do not often name other kinds of patterns. Design patterns provide a common vocabulary for designers to use to communicate, document, and explore design alternatives. Design patterns raise the level at which you design and discuss design with your associates. Once you have absorbed the design patterns on this website, your design vocabulary will almost certainly change. You will speak directly in terms of the names of the design patterns.