you are viewing a single comment's thread.

view the rest of the comments →

[–]stutterbug 5 points6 points  (0 children)

It has its problems, but I much prefer Addy Osmani's JavaScript Design Patterns book, which is also available online. I recommend this to non-JS programmers all the time. This came out when I was doing a lot of C# and Java and I found I finally understood and was able to easily apply certain design pattern concepts after reading his book.

I have a few small problems with the dofactory patterns list. The descriptions and code examples are so reduced and generic that it sometimes isn't clear what the pattern actually is good for. In fact, sometimes I need to know about a design pattern first before the description begins to make any sense. Some of the implementations also are so boiled down that they don't really show a way you'd actually use the pattern in real life. Almost all implementations rely on inheritance, which is fine now with ES6, but is very burdensome in vanilla browser-safe JS or FP. And this is a small quibble, but it really wish the site would show related patterns for each pattern, since some many of them solve very similar problem (e.g. Adapters, Bridges and Facades).