Friday, August 30, 2013

Knockout Vs Backbone.js

Knockout Vs Backbone.js

1) Both doesn't provide how application should be structured. Knockout provides bindings but It’s up to the developers to build well structured JavaScript applications beyond the models and model bindings.

2) Backbone is that it’s not a heavy-handed, prescriptive MVC framework. In truth, it fits within the MV* families, but is not MVC or MVVM or any other specific variant.  It takes ideas from a lot of these variants and provides a library of constructs that can be used when needed, without requiring the use of any of them – it’s flexible. It lets us use only a View when we want to, or only a Model when we want to. Unlike Knockout, Backbone does not directly address the model binding space. It provides plenty of hooks and open / flexibility in it’s design and implementation, though, allowing model binding to be integrated in to it.

    i) Model binding in backbone.js

3) Backbone is known to have a fantastic syncing system built as close as possible to the RESTful pattern. And if this is not good for your application you can always opt to build a custom Backbone.sync or, if further granularity is required, you can customize a Model/Collection's own sync function.

Knockout.js instead does not provide such a feature, and what it offers is a simple plugin to map into/from any JSON source.


No comments:

Post a Comment