August 6th 2011

Knockout JS

I have known about knockout.js for quite a while now. It’s one of those libraries that gets a lot of coverage, I just haven’t had the time to check it out.

From the introduction:

Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes) KO can help you implement it more simply and maintainably.

Check out my Hello World fiddle below:

On the result tab, notice if you edit one of the inputs, the text below changes automatically.

As I built out the eventual page I decided to try knockout out on, the following resources were very helpful:

  1. The knockout documentation – it’s very good
  2. Articles on Ryan Niemeyer’s blog