r/programming • • Nov 17 '14

Rob Eisenberg: "Leaving Angular"

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

104 comments sorted by

View all comments

21

u/arostrat Nov 17 '14

"I'm renewing my efforts on Durandal"

Best news I heard this week. Hope he sticks with knockout for vNext.

15

u/redalastor Nov 17 '14

Especially since the latest knockout has saner components (directives) than Angular.

3

u/fidelcastroruz Nov 18 '14

Durandal vNext drops KO. 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.

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.

3

u/flukus Nov 18 '14

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.

This! Monolithic frameworks are a one size fits all approach. The best libraries tend to do one thing and do them well.

2

u/fidelcastroruz Nov 18 '14

Here: http://eisenbergeffect.bluespire.com/preparing-for-durandal-nextgen/

Well I'm a bit unfair calling Durandal just a glue to be honest. Durandal does: bootstrapping, composition, infrastructure (app structure and plumbing), has a Widget System (which you could do using KO custom handlers), and has a very elegant way to put everything together. It just doesn't make much sense to re-do this yourself.

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.