Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Lap Around KnockoutJS

A Lap Around KnockoutJS

Knockout allows you to build complex and reactive web user interfaces in a short time and with a minimum of code

Avatar for Kelly Adams

Kelly Adams

April 09, 2012
Tweet

More Decks by Kelly Adams

Other Decks in Programming

Transcript

  1. A Lap Around KnockoutJS "Knockout allows you to build complex

    and reactive web user interfaces in a short time and with a minimum of code." -Me
  2. Model - View - ViewModel (MVVM) Model: A domain model

    object that contains data. ViewModel: An abstraction of the view that mediates the relationship of the View and the Model. View: GUI elements for user interaction.
  3. Why MVVM? • Separation of concerns o Testability o Ease

    of change o Delegation of tasks • Databinding: becauseResponse.Write("<p>" + dataRow[2].ToString() + "</p>") is fragile. • We already know how to do it o WPF/Silverlight • Asynchronous data loading is a better user experience.
  4. Knockout JS • Included in MVC4 projects by default •

    Supports all major browsers • 13kb with no dependencies • Richly documented with great tutorials • Free and open source (MIT License) http://knockoutjs.com/