PayPal releases Kraken, Node.js framework
krakenjs.com
krakenjs.com
In all seriousness, adding interstitials can provide value. If the login performance has high variance, it's better to set an expectation that it will take 5 seconds than leave the user wondering if the click actually worked. Similarly, Apple has done an amazing job with UI transitions in iOS to mask the actual load time.
Don't like:
dust.js templates instead of handlebars
self = this all over the place
native use of forEach and Object.keys instead of underscore or lowdash
====
I like:
that you can change the template system
grouping routes, I always add this myself, makes it more django like
security stuff like csrf
dev and prod environment awareness
directory layout is cool
apache license
uses grunt
they use Object.create!
one var statement per function
krakens
====
Overall pretty awesome.
p. s. I have no idea how to format text here.
Also: self = this can be avoided in a lot of cases with Function#bind, but not always. Seems like a weird criticism to me.
http://allyoucanleet.com/post/21624742336/jsconf-us-12-slide...
self = this is error prone because it relies on JavaScript's lexical scope to share a variable across nested functions. It's a gross abuse of closures. It invalidates the ability to bind or use apply later, since everything is bound to that local variable self, and it's simply not needed and is probably used to avoid considerable use of bind, but using bind is only an issue when you write flock of seagull style nested function code. using self = this is not the right solution, writing more modular code with smaller functions is.
lodash is the only one to be performance focused. underscore always uses the native methods when possible.
As for bind - funny that you mention that as a good alternative to using self/closure. Because while it is convenient and powerful, it's also slower than using self/closure.
I don't want to pretend that for either `[].forEach` or `bind` the differences in speed are (in most cases) really that relevant, I just found your argumentation a little confusing here. As for bind vs. closure-self I wouldn't say that either is really better than the other. Both are perfectly fine options. The former is a pretty heavy solution (since it's basically using a special case of partial application) and can be confusing (e.g. calling `a.b()` can have weird behavior even when the implementation of b is known). The latter is less powerful but a little more explicit imho - you really see the this-scope expansion and it's not hidden away. Both solutions obviously can't protect you from "flock of seagull style nested function code" but as you wrote: that's not a problem of the way someones does this-binding, it's a problem with the design.
As for self = this, I tend to agree that it's kind of gross in most cases. It's not something I use very often. But unless you're willing to say that you're never going to use anonymous functions, the reality is that sometimes it's useful.
Seems even their i18n component is tied to their view layer. And 0 doc comments in the scripts? how do they document their own code ?
Why this is relevant: kraken is a bitcoin trading platform. Paypal is a competitor to bitcoin.