SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
2.
Who am I?
Why a “Who am I?”
• Aymeric Gaurat-Apelli
• .NET developer/consultant since beta
• Worked in France, Australia (Readify) and Thailand
• Web entrepreneur
• Facebook games (1M users/day)
• http://taskarmy.com
• http://weekplan.net (knockout.js SPA)
• Employee at Jetabroad (Thailand)
3.
What is Knockout.js?
• Javascript MVVM library
• Declarative data binding
• Templating
• http://knockoutjs.com
4.
MVV What?
Model
View
Model
View
Knockout.js
love
Javascript
object
Portion
of HTML
Javascript
object
Server
side
5.
Basics
ko.applyBindings(viewModel, domElement);
Hey Knockout.js
Apply my view model here
HTML Page
No problem!
6.
Basics
ko.applyBindings(myViewModel, domElement);
Hey Knockout.js
Apply my view model here
HTML Page
No problem!
7.
Observables
Can have subscribers
Raise an event when the value changes
You can have observable arrays too
<input type=“text” data-bind=“value: personName” />
Two way binding