News for hackers. Stuff that matters.
Re:Migrating a large JavaScript project from DOM spaghetti t... by nerd_in_rage on Friday November 16, 2012 @12:34AM (#4792575)
I've taken a look at both Backbone and Knockout over the past week or so, and I definitely prefer the Knockout approach.

Backbone... I just don't get it. It seems like there's too much complexity. I'm mainly a back-end developer, so perhaps it's just me.

Re:Migrating a large JavaScript project from DOM spaghetti t... by thibaut_barrere on Friday November 16, 2012 @02:40AM (#4792879)
Like you, I'm more a back-end developer and attempted to pick Backbone initially for my SaaS, but I wasn't very successful with it.

Later I discovered Knockout and in 2 hours, I was up and running, and it never got in the way so far.

I can only encourage people to at least try the tutorials, it will be time well spent:

http://learn.knockoutjs.com/

Re:Migrating a large JavaScript project from DOM spaghetti t... by rimantas on Friday November 16, 2012 @02:41AM (#4792882)

  > It seems like there's too much complexity
Backbone helps you to do the things you understand. Knockout let's you do things you don't necessarily understand. Sometimes black-box approach is OK. Sometimes not.
Re:Migrating a large JavaScript project from DOM spaghetti t... by hasenj on Friday November 16, 2012 @03:55AM (#4793053)
Knockout, while it seems magical at first, is actually not so hard to reason about.

It's not really a "blackbox". It's quite easy to understand and extend too.

For instance, you can create your own custom bindings: http://knockoutjs.com/documentation/custom-bindings.html

This is about the only place where it gets low and dirty and involves you writing DOM manipulation code.

Re:Migrating a large JavaScript project from DOM spaghetti t... by pserwylo on Sunday November 18, 2012 @05:51PM (#4801983)
I'm not familiar with Knockout, but it sounds like my experience when we were getting into the Flex framework at work a couple of years ago. We thought the data binding was so magical, but once I started to work with it, I had a very good mental model of how the MXML/ActionScript compilers were doing their magic.

It was much more pleasurable to work with when it was no longer magical.

Re:Migrating a large JavaScript project from DOM spaghetti t... by romaniv on Friday November 16, 2012 @10:41AM (#4794216)
I'm not familiar with either framework, but at least I can understand the intent (if not mechanics) behind Knockout code. With Backbone, it's like reading a whole different language.