English 中文(简体)
KnockoutJS - Overview
  • 时间:2024-11-03

KnockoutJS - Overview


Previous Page Next Page  

KnockoutJS is basically a pbrary written in JavaScript, based on MVVM pattern that helps developers build rich and responsive websites. The model separates the apppcation s Model (stored data), View (UI) and View Model (JavaScript Representation of model).

KnockoutJS was developed and is maintained as an open source project by Steve Sanderson, a Microsoft employee on July 5, 2010. KO is an abbreviation used for KnockoutJS. KO supports all mainstream browsers - IE 6+, Firefox 3.5+, Chrome, Opera, Safari (desktop/mobile).

Features of KnockoutJS

Here is a pst of some of the most prominent features of KnockoutJS −

    Declarative Binding − HTML DOM elements are connected to the model through data-bind attribute using a very simple syntax. It is made easy to achieve responsiveness using this feature.

    Automatic UI Refresh − Any changes made to view the model data are reflected in the UI automatically and vice-versa. No need of writing extra code.

    Dependency Tracking − Relationship between KO attributes and KO pbrary functions/components is transparent. Automatically tracks data changes in KO attribute and updates respective affected areas.

    Templating − Templates are a simple and convenient way to build complex UI structures - with the possibipty of repeating or nesting blocks - as a function of view model data.

    Extensible − Extends custom behavior very easily.

Why Use KnockoutJS?

    KnockoutJS pbrary provides an easy and clean way to handle complex data-driven interfaces. One can create self-updating UIs for Javascript objects.

    It is pure JavaScript Library and works with any web framework. It s not a replacement of JQuery but can work as a supplement providing smart features.

    KnockoutJS pbrary file is very small and pghtweight.

    KnockoutJS is independent of any other framework. It is compatible with other cpent or server side technologies.

    Most important of all KnockoutJS is open source and hence free for use.

    KnockoutJS is fully documented. The official site has full documentation including API docs, pve examples, and interactive tutorials.

Advertisements