Knockout.js is an open source JavaScript library for dynamic HTML UIs using the Model-View-View Model (MVVM) pattern. Version 3.0 was released on October 25th, 2013.
Knockout.js is an implementation of the Model-View-View Model (MVVM) UI pattern. This tag is for questions specific to the 3.0 versions. Refer to the main knockout.js tag for general information.
Version 3.0 Features
Among its more interesting new features:
- Array change subscriptions – a super-fast way to find out how an observable array has changed (i.e., which items were just added/deleted/moved) without having to run any differencing algorithm. See the example later.
- Binding to detached nodes so frameworks built on top of Knockout have an easier time organizing all the DOM fragments they work with in the background.
- Clearer error reporting if binding hits a problem. After all, nobody enjoys debugging…
- More helpful handling of arrays in which each entry is an observable (as distinct from observable arrays, which have of course always worked nicely).
- Performance improvements
- Computed properties no longer issue change notifications by default if their computed value is definitely unchanged since last time.
- Reduced by almost half the number of hidden, internal observables that Knockout constructs to manage the state of your bindings.
- Reduced the stack depth when processing chained observable notifications by four call frames per observable, permitting much longer chains.
- Bug fixes including HTML-encoding dropdown-list captions, and reinstating the .toJSON function on the output from ko.toJS (which was inadvertently omitted in KO v3 beta).
- New build system based on Grunt.js to make contributing to Knockout easier. At last all the custom Bash scripts are gone :)
More Details
For more information about the 3.0 release refer to:
- Steven Sandersons' blog post about a Knockout 3.0 release candidate;
- R. Niemeyer's blog post about Knockout 3.0.