Need to compare Knockout with jQuery?
Actual answer for above question is “NO”. Knockout.js is not a replacement of jQuery, Prototype etc.,. It doesn’t target to provide animation or AJAX functionality (Knockout.js can parse the data which received from an AJAX request). Knockout.js is focused only designed on data-driven UI. It is compatible with other client-side and server-side technology.
Knockout.js uses a Model-View-ViewModel (MVVM) design pattern. In this, the model is react as data from back-end/business logic and the view is the visual representation of that data (UI) which is visible to the user and ViewModel acts as the intermediary between the model and the view.
How to use Knockout ?
Simply reference to be made for the knockout file using a <script> tag in our your HTML pages. Let see below example,