What is knockout js used for
Knockout JS Tutorial for Beginners
In this knockoutjs article I will talk about basics of knockout.js and why knockout.js is used for?
What are the problems in jQuery Approach?
Some of the problems in jQuery approach are as follows :-
- There is no Notification.
- There is no Automatic UI Refresh
- View (HTML web page) and Code Behind (js) are tightly coupled to each other. For example If you change ID of one the element (input control), you need to change JS also else application may fail or may get errors.
Note: Well all above can be solved using jQuery but implementation would be very complex and tough. Where as the Knockout.js helps us to implement all above things very easily.
Some of the major reasons why knockoutjs is used for as follows :-
- It detect the data changes in data model and updates respective part of the UI. For example showing custom messages.
- Binding data and UI declaratively. In other words declarative binding between data model and UI can be done using knockout.js
- Creating custom behavior by using Computed observable.
- It helps to create complex dynamic UI using declarative bindings.
Further articles will give you the details about how to work with JSON data with knockout.js, Declarative Bindings, Computed observable etc.