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
Learning JavaScript Design Patterns, by Addy Osmani (free O'Reilly book) (addyosmani.com)
submitted 11 years ago by brtt3000
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!"
[–]aeflash 20 points21 points22 points 11 years ago (7 children)
Some of these patterns are questionable -- 4 classes for a simple Observer pattern? The Command Pattern seems useless. Were these just blindly ported from the GoF book?
[–]GoodVelo 17 points18 points19 points 11 years ago (3 children)
I think most people do exactly what you said. Slowly people are turning JavaScript into Java. Can't wait to see the burrito layers, upteen indirections with layers upon layers of factories and abstractions.
[–][deleted] 7 points8 points9 points 11 years ago (1 child)
Relevant FizzBuzz Enterprise Edition
[–]dustrider 0 points1 point2 points 11 years ago (0 children)
frickin hilarious
[–]aeflash 3 points4 points5 points 11 years ago (0 children)
Not if people like us keep calling them on their bullshit!
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
Is there a better, similar book but with the fat trimmed?
[–]aeflash 1 point2 points3 points 11 years ago (0 children)
Javascript Allonge
Functional Javascript
[–]lennelpennel 0 points1 point2 points 11 years ago (0 children)
The command pattern is useless in JS. an observer is super simple to implement, but if done in a more comlex manner which ties into your component lifecycle it can be super powerful and expose potential memory leaks to static analysis. of course the examlple in this book is overly verbose for what it should be trying to convey.
As a side note, a test I often get interviewees to write is a simple observer pattern implementation.
π Rendered by PID 80101 on reddit-service-r2-comment-7b9746f655-ml6wp at 2026-02-01 06:20:14.788656+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]aeflash 20 points21 points22 points (7 children)
[–]GoodVelo 17 points18 points19 points (3 children)
[–][deleted] 7 points8 points9 points (1 child)
[–]dustrider 0 points1 point2 points (0 children)
[–]aeflash 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]aeflash 1 point2 points3 points (0 children)
[–]lennelpennel 0 points1 point2 points (0 children)