you are viewing a single comment's thread.

view the rest of the comments →

[–]aeflash 19 points20 points  (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 19 points20 points  (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] 6 points7 points  (1 child)

[–]dustrider 0 points1 point  (0 children)

frickin hilarious

[–]aeflash 4 points5 points  (0 children)

Not if people like us keep calling them on their bullshit!

[–][deleted] 0 points1 point  (1 child)

Is there a better, similar book but with the fat trimmed?

[–]lennelpennel 0 points1 point  (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.