KnockoutJS Introduction
KnockoutJs is a JavaScript library written on MVVM pattern. KnockoutJs is widely used in single page application and it is very easy to learn and implement also. KnockoutJs Provides an easy way to handle Complex data driven interface. KnockoutJs was developed by Steve Sanderson Microsoft employee in the year 2010, but the stable version comes in 2017. KnockoutJs support almost all modern browsers like Chrome , Firefox ,Opera ,Safari,IE . KnockoutJs is a free and open source software.
KnockoutJs follow MVVM pattern
Model : Model is responsible for holding data of user interface element.
View : View represent the data from model user interface. View provides structure layout of the user interface and present to the user
Viewmodel : Viewmodel is a mediator between view and model.Viewmodel communicate between view and model to share data and functions. Data menu created by the function that attributed to the user interface. When a data is changed, it is also reflect in the user interface as new model is the communicator for any change of data.
This architecture have several benefits, a clear separation between domain data, view component and data to be displayed, present a clearly defined clear when is the relationship between view and component.
Here are some point about KnockoutJs
MVVM Model
KnockoutJs is a JavaScript library written on MVVM pattern. KnockoutJs is widely used in single page application and it is very easy to learn and implement also. KnockoutJs Provides an easy way to handle Complex data driven interface. KnockoutJs was developed by Steve Sanderson Microsoft employee in the year 2010, but the stable version comes in 2017. KnockoutJs support almost all modern browsers like Chrome , Firefox ,Opera ,Safari,IE . KnockoutJs is a free and open source software.
KnockoutJs follow MVVM pattern
Model : Model is responsible for holding data of user interface element.
View : View represent the data from model user interface. View provides structure layout of the user interface and present to the user
Viewmodel : Viewmodel is a mediator between view and model.Viewmodel communicate between view and model to share data and functions. Data menu created by the function that attributed to the user interface. When a data is changed, it is also reflect in the user interface as new model is the communicator for any change of data.
This architecture have several benefits, a clear separation between domain data, view component and data to be displayed, present a clearly defined clear when is the relationship between view and component.
Here are some point about KnockoutJs
- KnockoutJs is free and open source software.
- KnockoutJs library is very light and small in size (58kb).
- Provides a very easy clean way to handle Complex data driven interface.
- A lot of documentation is available.
MVVM Model
It is very easy to use KnockoutJs. You will find the full
documentation of KnockoutJs and its usage here.
http://knockoutjs.com/documentation/introduction.html
There are two options, that you can choose to use KnockoutJs.
You can download KnockoutJs library or you can refer the CDN
of KnockoutJs. To apply the KnockoutJs in your project simple
add a tag "script" and source(src) of the script tag will be
either your local file or CDN.
There are two type of version available , one is minified and
another is original version. You can use both.
Below is the example of how you will use KnockoutJs
downloaded version.
Below is the example of how you will used KnockoutJs from CDN.
Alternatively you can refer to a minified version of KnockoutJS
library from CDNJS.