Monday, 9 December 2013

Knockoutjs - Understand Working

 Features
-Knockoutjs is a pure javascript library .
-It help u to create dynamic UI with less code
-it is very responsive on User's Action
-attaching data with UI very easy for complex module
-compact in size
-run on almost all updated browser.(may not older version)
-KO is used to implement knockoutjs in your UI

How it is Different from Javascript & JQuery
-It represent items as a JavaScript array, and then use a foreach binding to transform this array into   a TABLE or set of DIVs
- Don't need to create ant loop
- As data changes UI changes .
- More Efficient .
jQuery doesn’t have a concept of an underlying data model.

FOR EXAMPLE :
<div data-bind="foreach:data">
<input type="text" data-bind="text:data.name()"/>
</div>

KO doesn’t compete with jQuery or Javascript. KO provides a flexible,efficient, high-level way to link a data model to a UI. KO itself doesn’t depend on jQuery, but you can certainly use jQuery at the same time, and indeed that’s often useful if you want things like animated transitions.





No comments:

Post a Comment