It’s pretty fair to say that JavaScript is not a fad; it is by far
the most widespread programming language out there and also the most available runtime we have, ranging from toasters to the web, and even to the backend development through Node.js. Its probably also fair to say that we should really embrace it and start treating it like a first class citizen of our day to day work. In this talk, Einar will take you on a tour of how you can work with JavaScript with similar patterns you’re already used to from the rest of your server code. Writing tests or specifications that proves your code is also important, Einar will show how to get started with this and how you can achieve more testable JavaScript by applying patterns like MVVM (Model View ViewModel) using KnockoutJS
12. … it all begins with $
Polluted CSS selectors
Passive views
Hard to test
Heavy coupling
Couples JavaScript (business logic) to DOM
13. MVVM
Based on Presentation Model by Martin Fowler
http://martinfowler.com/eaaDev/PresentationModel.html
Commonly used in the XAML stack
WPF
Silverlight
WP7
WP8
Windows RT / Store Apps
14. MVVM
Model Get from server
View
Observes
Observable
ViewModel