Chapter 00. Introduction
If you’re ever writing code and get the funny feeling that you’ve solved the problem you’re working on before, you probably have. You may well have come across the same type of situation in the past, puzzled about it, and come up with the solution. And before that, you may have faced the same type of situation and come up with the same type of solution. And even before that . . . same thing.
Why keep reinventing the wheel? Why not just write down your solution and refer back to it as needed? That’s what design patterns are all about. A design pattern represents a solution to a problem or class of problems that you can put to work at once in your own code.
In fact, design patterns go one step further — they also let you share in the solutions found by other programmers, and expert programmers at that. The design patterns you see in this book represent insightful solutions to dilemmas that just about every programmer comes up against sooner or later, and knowing them is going to save you a lot of time and effort.
Got a problem? Most likely, there’s a design pattern for that. All you need to know is that someone has already solved your problem for you, with a careful eye towards good programming practices and efficiency. And all you have to do is apply that solution to your own code. Once you know how, there’s nothing to it.
The design patterns covered in this book are essential for any programmer to know — and certainly for any professional programmer. There’s ...
Get Design Patterns For Dummies® 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.