Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



What 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.


I liked Head First Design Patterns. It's fun and covers most of GoF patterns (with a brief overview of leftovers). The examples (although fairly trivial) are in Java.


It predates Java, and there are a number of examples that use SmallTalk.


Why 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?


Never 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: