2 ms·
If a design pattern is new, then it isn't a design pattern -- by definition :-). I neglected to say it outright, but a design pattern is a solution to a probl
by mikekchar 9y ago
If a design pattern is new, then it isn't a design pattern -- by definition :-). I neglected to say it outright, but a design pattern is a solution to a problem that already exists in code bases within different domains. The recommended number of different domains is 3 (which is why I used that in my example). The pattern is there to document the situation where the solution applies, where it doesn't apply (very important!), and to give a name to it. Some of the common names for design patterns are arguable pretty poor, although I've never actually seen dependency injected written up as a design pattern (it definitely could be).
I could go on for quite a while about specifics of design patterns (and particularly "generative design patterns" and "pattern languages"), but I think I would be accused of writing an article about design patterns ;-). I think the biggest problem I've seen with articles on design patterns is that there are a lot of articles that are written by people who don't understand them, and haven't read the original literature about them. This isn't confined to design patterns, though. I could say the same thing about pretty much everything in our industry. If you find an article saying x-famous-thing-is-crap, you can almost be positive that if you go back to the origins of x-famous-thing that it's not actually crap at all -- it's just been badly misunderstood by successive generations of anti-evangelists.