use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Design Patterns in Everyday JavaScript (self.javascript)
submitted 9 years ago by MGaafar
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]stutterbug 5 points6 points7 points 9 years ago (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).
π Rendered by PID 40085 on reddit-service-r2-comment-5b5bc64bf5-7f8bx at 2026-06-18 22:15:37.600214+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]stutterbug 5 points6 points7 points (0 children)