4 ms·
It has a couple of patterns that have been more or less rejected by modern OO leaders: 1. "Singleton" (enough said) 2. "Template method" is more or less "inher
by svachalek 14y ago
It has a couple of patterns that have been more or less rejected by modern OO leaders:
1. "Singleton" (enough said)
2. "Template method" is more or less "inheritance over delegation"
There's also a couple like Flyweight that are of such narrow applicability that they hardly merit placement on the short list with classics like Composites and Factories, and a few new items like Dependency Injection are surely worth a mention whether you want to argue for or against it.
Finally it's got an approach to presenting and explaining the patterns that clearly predates the web and modern attention spans. All that said, it's still a classic, but depending on the preferred language and technical proficiency of the reader it wouldn't always be my recommended introduction to design patterns.
- blt 14y agoWhat is your recommended introduction to design patterns? I've been meaning to read the original but I do get that old-school clunky Java feel from it. I'd be very interested in an updated Design Patterns for OO languages with mild functional capabilities like C++11, C#, Python.
- chris_wot 14y agoWhy has the singleton pattern been rejected? Similarly, why has the template method been rejected? Both seem entirely reasonable patterns to me - what is so wrong with them?
- chris_wot 14y agoNever mind. The singleton pattern, I can see why it should be used judiciously - to my mind none of the arguments I've read are completely compelling. However, the template method pattern I do understand now. Far better to define an interface, then inject an instance object that implements the interface and work on that.