Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should i spend my effort implementing knockoutjs or look into jQuery Data Link [closed]

I've recently been using Steve Sanderson's knockout js library http://knockoutjs.com/ in my client side web development. I just recently found out that microsoft has contributed code to jQuery for a Data Link plugin that seems to duplicate what I like about knockout.

http://weblogs.asp.net/scottgu/archive/2010/10/04/jquery-templates-data-link-and-globalization-accepted-as-official-jquery-plugins.aspx
https://github.com/jquery/jquery-datalink
http://api.jquery.com/category/plugins/data-link/

Should I scrap my knockout code and go with the embraced and extended jQuery?

like image 457
devSolo Avatar asked Nov 18 '10 05:11

devSolo


People also ask

What is Knockoutjs used for?

Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model.

Does knockout use jQuery?

Any section of UI that should update dynamically (e.g., changing depending on the user's actions or when an external data source changes) with Knockout can be handled more simply and in a maintainable fashion. Knockout has no dependencies. It works without jQuery, Prototype.

Where is knockout js used?

Knockout. js is a minimalist JavaScript framework for web application development. It is a JavaScript library that allows binding HTML elements against any data model. It is primarily used for creating rich and responsive display as well as editor user interfaces with a clean, underlying data model.


1 Answers

I'd stick with Knockout personally -- it's already been demonstrated to work quite well, it's in active development, and it knocks data-link off the charts when you compare features. In short, Knockout seems ready for prime time, while data-link feels unfinished.

(I stress tested Knockout by having it data-bind a dropdown to an array of 5,000 items, while also calculating the number of unique items in the array and adding that to another data-bound element. My calculations and the re-painting of the browser chrome took far longer than the data-binding and updating.)

Now, that being said, I would keep an eye on data-link and probably continue to play around with it -- if it gets off the ground, it will be a very viable alternative. (Given the success of jquery-tmpl, the other major piece to come out of the Microsoft-Jquery cooperation.)

The better one to compare Knockout to would be documentcloud's backbone. I'm looking into backbone next week, so I don't have any good recommendations for now, but I've been very impressed with underscore (another of their projects), so I would definitely recommend looking into it as an alternative.


The score 4 years later
for those who are wondering

Knockout has been used in production on all kinds of projects for years, is now at version 3, and has a healthy ecosystem around it. jQuery.datalink became JSViews, which is still in beta.

like image 192
Sean Vieira Avatar answered Oct 10 '22 22:10

Sean Vieira