Echo JS 0.11.0

<~>

mxxx comments

mxxx 3576 days ago. link 1 point
Agreed! But it's a clean pattern to utilise regardless.
mxxx 3577 days ago. link 1 point
interesting article, but it always puts me off when someone makes a throwaway comment like 

"It could be Angular, lodash (you’re not still using underscore, are you?)..."


what's the problem with underscore?
mxxx 3577 days ago. link 1 point
I wish more people would read this article. RequireJS allows you to use 'shim' directives to try and jimmy in support for non-AMD scripts, but it's really not difficult for people to bake in support for their modules.
mxxx 3606 days ago. link 1 point
The event listeners in the example code are a bad pattern, namely the use of 'bind' without a matching 'unbind'. 

When binding callbacks on a View to events on a Model/Collection, it's preferable to use .listenTo(), since all bindings that are listenTo'd are unbound on View.remove().


Also if you are bind()ing directly, i'd be inclined to use on(), seeing as that's the method listed in the docs (bind is simply an alias of on).
mxxx 3674 days ago. link 1 point
Wonder if they've open sourced it because it's dead.  This has been doing the rounds for years now.
mxxx 3674 days ago. link 2 points
Great read. Was struggling to see use cases for some of the latter examples but definitely food for thought.
mxxx 3690 days ago. link 0 point
commenting to boost myself up the leaderboards... ;)
mxxx 3723 days ago. link 1 point
off the top of my head, i'd go with:


var path = require('path');
res.render(path.join(__dirname, 'someview.hjs'))
mxxx 3742 days ago. link 1 point
yeah, jQuery promises are a bit closer than they used to be, but still not completely compliant. 

the classlist code they use has a fallback for IE (regex for class removal, string concat for adding).
[more]