Knockout (web framework)

Short description: JavaScript library

KnockoutOriginal author(s)| Steve Sanderson

|

Initial release| July 5, 2010 (2010-07-05)
Stable release|

3.5.1 / November 5, 2019; 6 years ago (2019-11-05)

Repository| Knockout Repository
Written in| JavaScript
Size| 59 KB minified / 283 KB (development mode)
Type| JavaScript library
License| MIT
Website| knockoutjs.com

Knockout is a standalone JavaScript implementation of the Model–View–ViewModel pattern with templates. The underlying principles are therefore:

* a clear separation between domain data, view components and data to be displayed
* the presence of a clearly defined layer of specialized code to manage the relationships between the view components

The latter leverages the native event management features of the JavaScript language.

These features streamline and simplify the specification of complex relationships between view components, which in turn make the display more responsive and the user experience richer.

Knockout was developed and is maintained as an open source project by Steve Sanderson.

## Contents

* 1 Features
* 2 Example
* 2.1 View Model (JavaScript)
* 3 References
* 4 External links

## Features

Knockout includes the following features:

* Declarative bindings
* Automatic UI refresh (when the data model's state changes, the UI updates automatically)
* Dependency tracking Templating (contains a dedicated template engine, but other templating engines can be used)

## Example

In this example, two text boxes are bound to observable variables on a data model. The "full name" display is bound to a dependent observable, whose value is computed in terms of the observables. When either text box is edited, the "full name" display is automatically updated, with no explicit event handling.

### View Model (JavaScript)

function ViewModel() {
this.firstName = ko.observable("");
this.lastName = ko.observable("");

this.fullName = ko.computed(
function() { return this.firstName() + " " + this.lastName(); },
this);

ko.applyBindings(new ViewModel());

## References

* Papa, John (February 2012). "Getting Started with Knockout". MSDN Magazine. http://msdn.microsoft.com/en-us/magazine/hh781029.aspx.
* Papa, John (March 2012). "Knockout's Built-in Bindings for HTML and JavaScript". MSDN Magazine. http://msdn.microsoft.com/en-us/magazine/hh852598.aspx.

## External links

* v
* t
* e

JavaScript templating libraries

Libraries|

* AngularJS
* Backbone.js
* Chaplin.js
* Dust.js
* Ember.js
* Handlebars.js
* KnockoutJS
* Marko.js
* Mustache.js
* React.js
* Vue.js
* Svelte

Concepts|

* Model–view–controller (MVC)
* Model–view–viewmodel (MVVM)

* v
* t
* e

Web frameworks

* Comparison

C++|

* CppCMS
* Wt

CLI|

* ASP.NET
* Core
* AJAX
* Dynamic Data
* MVC
* Razor
* Web Forms
* DNN
* BFC
* MonoRail
* OpenRasta
* Umbraco
* WebSharper

ColdFusion|

* CFWheels
* ColdBox Platform
* ColdSpring
* Fusebox
* Model-Glue

Common Lisp|

* Caveman2
* CL-HTTP
* Weblocks

Haskell|

* Yesod
* Snap

Java|

* AppFuse
* Flexive
* Grails
* GWT
* ICEfaces
* ItsNat
* JavaServer Faces
* JHipster
* Jspx
* JWt
* OpenXava
* Play
* Remote Application Platform
* RIFE
* Seam
* Sling
* Spring
* Stripes
* Struts
* Tapestry
* Vaadin
* Vert.x
* WebWork
* Wicket
* WaveMaker
* ZK

JavaScript|

* Angular/AngularJS
* Backbone.js
* Chaplin.js
* Closure
* Dojo Toolkit
* Ember.js
* Express.js
* Ext JS
* jQuery
* Knockout.js
* Meteor
* MooTools
* Node.js
* OpenUI5
* Prototype
* React
* Rico
* script.aculo.us
* Sencha Touch
* SproutCore
* Svelte
* Vue.js
* Wakanda

Perl|

* Catalyst
* Dancer
* Mason
* Maypole
* Mojolicious
* WebGUI

PHP|

* CakePHP
* CodeIgniter
* Drupal
* Fat-Free
* FuelPHP
* Flow
* Grav
* Gyroscope
* Horde
* Joomla
* Kohana
* Laravel
* Lithium
* Midgard
* MODX
* Nette
* Phalcon
* PHP-Fusion
* Pop PHP
* PRADO
* ProcessWire
* Qcodo
* Silex
* SilverStripe
* Symfony
* TYPO3
* WordPress
* XOOPS
* Yii
* Zend Framework

Python|

* BlueBream
* CherryPy
* Django
* Flask
* Grok
* Nevow
* Pyjs
* Pylons
* Pyramid
* Quixote
* TACTIC
* Tornado
* TurboGears
* web2py
* Webware
* Zope 2
* more...

Ruby|

* Camping
* Merb
* Padrino
* Ruby on Rails
* Sinatra

Scala|

* Lift
* Play
* Scalatra

Smalltalk|

* AIDA/Web
* Seaside

Other languages|

* Vibe.d (D)
* Application Express (PL/SQL)
* Grails (Groovy)
* Kepler (Lua)
* OpenACS (Tcl)
* Phoenix (Elixir)
* SproutCore (JavaScript-Ruby)
* Yaws (Erlang)

* v
* t
* e

ECMAScript

Dialects|

* ActionScript
* Caja
* JavaScript
* engines
* asm.js
* JScript
* JScript .NET
* QtScript
* TypeScript
* WMLScript

Engines
(comparison)|

* Carakan
* Futhark
* InScript
* JavaScriptCore
* JScript
* KJS
* Linear B
* Narcissus
* QtScript
* Rhino
* SpiderMonkey
* TraceMonkey
* JägerMonkey
* Tamarin
* V8
* ChakraCore
* Chakra
* JScript .NET
* Nashorn

Frameworks|

| Client-side|

* Chaplin.js
* Dojo
* Echo
* Ext JS
* Google Web Toolkit
* jQuery
* Lively Kernel
* midori
* MochiKit
* MooTools
* Prototype
* Pyjs
* qooxdoo
* Rialto
* Rico
* script.aculo.us
* SmartClient
* SproutCore
* Spry
* Wakanda Framework

|

Server-side|

* AppJet
* Jaxer
* Node.js
* WakandaDB

Multiple|

* Cappuccino
* Objective-J
* PureMVC

Libraries|

* Backbone.js
* SWFObject
* SWFAddress
* Underscore.js

People|

* Brendan Eich
* Douglas Crockford
* John Resig
* Scott Isaacs

Other|

* DHTML
* Ecma International
* JSDoc
* JSGI
* JSHint
* JSLint
* JSON
* JSSS
* Sputnik
* SunSpider
* Asynchronous module definition
* CommonJS

Lists
JavaScript libraries
Ajax frameworks
Comparisons
JavaScript frameworks
server-side JavaScript

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Knockout (web framework). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Knockout_(web_framework)&oldid=769503"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template