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?
Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With