16 Design Patterns: The Good, the Bad, and the Ugly

WHAT’S IN THIS CHAPTER?            

  • The good—how design patterns can lead to success
  • The bad—how overuse and misuse of design patterns can lead to trouble
  • And the ugly—how some “de-facto” standards can lead to failure

So far, this book has covered many of the classical design patterns from the GoF1 book as well as some additional patterns that may find their way to becoming classics in the future. This book was written with the aim of being something that the authors would have bought themselves if they had not written it.

As is true with everything in life, design patterns do not always do good. They can do harm as well by leading you into implementing an anti-pattern. This chapter focuses on the good, the bad, and the ugly aspects of design patterns and hopefully provides a better approach for your heavy arsenal of patterns.

THE GOOD: PATTERNS FOR SUCCESS

As has been mentioned many times before, design patterns are the collective wisdom and experience of many smart developers. They unleash a great depth of experience that you can utilize to solve many common problems that occur in software development. Even in the early days of programming when using goto was considered legal (and acceptable), many projects failed. One of the early important resources on software engineering and project management was The Mythical Man-Month written by Frederick Brooks while he was managing development of OS360 for IBM.2 Although ...

Get Professional Java EE Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.