Kurs: Using Knockout to build Dynamic, Testable Web Uis

Klasserom2 dagerKursNorsk

Dette kurset har ikke oppført noen dato for studiestart. Bruk skjemaet under for å kontakte leverandør for nærmere informasjon.

The Knockout library provides support for data binding in a JavaScript and HTML environment. This in turn enables web developers to put the the MVVM (Model, View, View-Model) presentation pattern to use. Much of Knockout's popularity is thanks to the way it simplifies writing dynamic UIs. It has also been embraced by Microsoft, and is now included with ASP.NET MVC. Applying the MVVM pattern also offers another great benefit: the ability to easily write good unit tests for interaction logic! 

This course will teach you how to use Knockout effectively - but it doesn't stop there. It also teaches you what a view model is, what it should be responsible for, and how to factor it. And, perhaps most importantly, you will learn how to write tests for your view models.  Along with explanations of the patterns and techniques involved and many code walkthroughs, the course also has a series of practical labs, providing an opportunity for you to dig in to Knockout and try writing view model tests for yourself.




Dag 1


  • The architecture of the web
  • The rise of the Single Page Application
  • The challenge of user experience
  • The need for testability
  • The role of design patterns, and how they help


The MVVM Presentation Pattern

  • So what is a model, anyway?
  • RESTful models
  • Views
  • View Models
  • Data binding
  • The observer pattern


Introducing Knockout

  • What is Knockout?
  • Declarative data binding in HTML
  • Creating simple view models with observables
  • Binding the view model to the view
  • Exercise: your first view model


Basic View Model Testing

  • What is unit testing?
  • Why write automated tests?
  • Introduction to QUnit
  • Writing basic view model unit tests
  • Exercise: writing some basic view model tests


Computed Observables

  • What is a computed observable?
  • How dependency tracking works
  • Writing tests
  • Writable computed observables
  • Exercise: using a testing computed observables


Event Binding and Server Interaction

  • Client side view model, server side model
  • Event binding
  • How to factor the server interaction for testability
  • Implementing the call to the server
  • Testing the interaction without really calling the server
  • Exercise: event binding and server interaction


Dag 2

Observable Arrays

  • What is an observable array?
  • The foreach binding
  • Populating with data from the server side - in a testable way
  • Exercise: observable arrays and the foreach binding


Filling In Some Gaps: More Bindings and the Binding Context

  • The if and ifnot bindings
  • The with binding
  • The css, style and attr bindings
  • The hasFocus binding
  • The uniqueName binding, and when you may need it
  • The binding context, $root, $data, $parent, $index and $element
  • Exercise: bindings and binding contexts



  • The re-use problem templates tackle
  • Basic template usage
  • Rendering tree-like data using templates
  • Dynamically selecting templates
  • Integrating other template engines
  • Exercise: templates


Custom Bindings

  • What are custom bindings?
  • Using a plug-in providing a custom binding
  • Writing your own custom binding
  • Exercise: custom bindings


Also Good To Know

  • Augmenting observables with extenders
  • The throttle extender
  • The mapping plug-in
  • Performance gotchas
  • Where to find stuff: plug-ins, examples, documentation




Participants should have a working knowledge of HTML and some prior JavaScript programming experience. Knowing the basic syntax and being comfortable with functions will be sufficient; JavaScript's Object Orientation support will be covered in the course to the degree that is required for writing and testing view models.




About the instructor: Jonathan Worthington From business applications to compiler writing, and from .Net to Perl, Jonathan has a wide range of software development experience. He deeply believes that good development has to be a strongly holistic activity, drawing on mathematics, engineering, linguistics, economics, psychology and more. By looking at insights from many fields, he works hard to deliver solid and maintainable software solutions. Originally from the UK, and having spent time in Spain and Slovakia, Jonathan is currently based in Sweden.  Jonathan is also a very active open source contributor, and a popular speaker at a range of international workshops and conferences.


Using Knockout to build Dynamic, Testable Web Uis hos Glasspaper
Start her
100% sikkert skjema
Tar ett minutt å fullføre
Hurtig respons

Felt som er merket med * må fylles ut
Ønsket valuta *
Dato og sted *
Hvor mange? (Gavekort)
Kampanjekoden er korrekt og rabatt er lagt til.
Fant ingen kampanje. Skrev du kampanjekoden riktig?
Kampanjekode er korrekt, men kampanjen gir ikke bedre pris enn nåværende kampanje.
Deltaker {{$index+1}}
Filen ble lastet opp
Filen ble fjernet
Laster opp... {{item.upload_progress}}%
{{ file.file.name }} Fjern
{{total_price | fprice}} kr {{currency}}
{{total_price-total_with_discount | fprice}} kr {{currency}}
{{total_with_discount | fprice}} kr {{currency}}
{{total_vat | fprice}} kr {{currency}}

MVA per produkt:

Betalingsmåte *
Number: 1+2 *
Vennligst rett opp følgende og forsøk igjen
Vent til opplasting av fil er ferdig

Dette skjemaet er 100% sikkert.
Glasspaper vil snart kontakte deg og bekrefte!


Åpen deltakerdiskusjon om kurset eller emnet

Del gjerne din erfaring eller tanker om dette kurset eller temaet med andre!

Anbefalinger fra andre brukere