Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #15301 > unrolled thread

Trying to start a new blog series on JS design patterns. Would love some feedback.

Started byRob Dodson <lets.email.rob@gmail.com>
First post2012-08-09 10:30 -0700
Last post2012-08-09 10:30 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.javascript


Contents

  Trying to start a new blog series on JS design patterns. Would love some feedback. Rob Dodson <lets.email.rob@gmail.com> - 2012-08-09 10:30 -0700

#15301 — Trying to start a new blog series on JS design patterns. Would love some feedback.

FromRob Dodson <lets.email.rob@gmail.com>
Date2012-08-09 10:30 -0700
SubjectTrying to start a new blog series on JS design patterns. Would love some feedback.
Message-ID<68e4226f-1d21-44bf-b59b-2e1cd2adfd39@googlegroups.com>
I shared my first few posts on freenode's #javascript channel and got some great responses. They told me to post to comp.lang.javascript for some better (and harsher) feedback.

TOC: http://robdodson.me/blog/2012/08/03/javascript-design-patterns/
Strategy: http://robdodson.me/blog/2012/08/03/javascript-design-patterns-strategy/
Singleton: http://robdodson.me/blog/2012/08/08/javascript-design-patterns-singleton/

The primary feedback so far has been that my examples are too contrived and don't take full advantage of the functional nature of JavaScript. The 'Movement' example in my Strategy post is particularly egregious. A user on IRC mentioned that it should return a function otherwise it's just a "clumsy closure." I'm not sure how to rewrite it to be satisfactory though and I'd love some input on that. I want to learn! 

I know that many people hate design patterns for a number of well justified reasons. With JavaScript being so "nimble" many of the patterns that are necessary in Java aren't as useful when you consider that functions are first class citizens. Also patterns are overused and dangerous in the wrong hands. I chose this topic because (I think) it will force me to confront the differences between the classical languages that I'm used to and the functional/prototype approach in JavaScript. Already I'm *struggling* to write these articles and that's a good thing because I'm forced to dig deeper into the language than I normally would.  So thanks to anyone who takes the time to read my stuff and respond, I deeply appreciate it.

[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web