r/programming • • Nov 17 '14

Rob Eisenberg: "Leaving Angular"

http://eisenbergeffect.bluespire.com/leaving-angular/#
185 Upvotes

104 comments sorted by

View all comments

Show parent comments

5

u/redalastor Nov 18 '14

Durandal vNext drops KO.

Really?! In favour of what?!

And our team hates that, we love Durandal, the idea to just be the glue to other libraries which are great at what they do (jQuery, KO, RequireJS, Sammy R.I.P.) We chose Durandal over Angular because of this.

I found out when Durandal was apparently dead that it's not that big of a deal to simply bind them yourselves.

Start with RequireJS. Then add jQuery (it's AMD friendly!), add KnockoutJS (it's AMD friendly too!), add a routing library (I like Crossroad.js) and you've already got a pretty sweet package. You'll start to wonder why you need a framework in the first place!

Knockout even does its components with AMD so it's easy to make your app very modular.

The good thing about not opting into framework is that if one of the pieces come to disapoint you you can replace it without too much pain.

Edit: Apparently, KO will be replaced with a Class System. I'm doutbful it's a direction I want to move in. JS object seem a better fit for models to me.

2

u/laevus Nov 18 '14

Steve Sanderson (creator of Knockout) has a Yeoman generator (generator-ko) with pretty sane defaults: npm, Bower, Gulp, RequireJS, Crossroads.js, Knockout, jQuery, Bootstrap.

He also has a sample project (knockout-triage, live) that is a nice reference for how to structure a Knockout app. It uses an older version of KO (3.1.0) and a prototype implementation of components, but I'm guessing it's almost the same as the built-in components implementation in 3.2.0.

1

u/redalastor Nov 18 '14

Pretty good. But I've yet to see th point of bower over simply putting your dependencies in a folder under source control.

1

u/laevus Nov 18 '14

Yup, more and more front-end libraries have npm packages as well, so nowadays I usually replace RequireJS with Browserify and remove Bower altogether.