Skip to content

Latest commit

 

History

History
 
 

README.md

What is Knockout.js?

  • A "Model View Viewmodel" user interface framework
    • Model - persistent data residing on the server
    • Viewmodel - the client-side model that drives the user interface
    • View - the user interface DOM elements
  • Core functionality
  • Limited in scope to user interface only
    • Does not deal with routing or AJAX
    • Gaps filled by Durandal.js

Framework Comparison Table

  • Shows popular JavaScript Frameworks related to building single page applications
  • "Yes" means the feature is included
  • blank means it is not included
  • a library name means there is an additional library for the feature
Library Size Github Stars Templating Data Binding Routing
Backbone.js 6.5kb 18,167 Yes
Knockout.js 17kb 5,036 Yes Yes Durandal
Angular.js 106kb 24,580 Yes Yes UI-Router
Ember.js 71kb 10,368 Yes Handlebars Yes
Can.js 82kb 928 Yes Yes Yes
React.js 123kb 7,015 Yes Yes react-router-component

Table fields:

  • Size - minified library size
  • GitHub Stars - number of people who have starred the repository (popularity indicator)
  • Observable - the library has some means to observe changes in a model with named properties
  • Computed Properties - explicitly supports data dependency graphs
  • Data Binding - automatic synchronization between views and models
  • Composable Views - views can contain other views (also called "partials")
  • Routing - responding to changes in the URL hash fragment and parsing its parameters

More frameworks:

Examples

  • Illustrate Knockout features in small increments
  • Meant to be as simple as possible (e.g. no Bootstrap or Grunt)
  • Check out the example viewer

Listing of all examples:

Sources