Knockout.js & SignalR
-
Upload
agir-borsteinsson -
Category
Technology
-
view
4.337 -
download
0
description
Transcript of Knockout.js & SignalR
Knockout.jsDynamic Web UIs and the MVVM pattern
Ægir Þorsteinsson
Landsbankinn@thorsteinsson
http://thorsteinsson.is/
Knockout.jsMVVM for HTML and JavaScript
~ 1 year old; active community
Community project
(not run by Microsoft)
Open source JavaScript library
(MIT license – source on GitHub)
Knockout.jsWhat is it good for?
Rich client-side interactivity
MVVM pattern
Wide browser support
6+ 2+
Bye bye, overlapping mess of interrelated event handlers
Hello, object-oriented JavaScriptand declarative bindings
http://knockoutjs.com
MVVM in JavaScript
“Model”
ViewModel
View
Server
Brow
ser
Ajax / form posts
Automatic
Any server-side technology
JavaScript + observables
HTML + declarative bindings
Examples
Examples
Commonly-used bindings
clickevent submit
visible
checked
disable
value options
selectedOptions
text html
css style
enable
attr
foreachwithif
Content & appearance
Events
Form fields
Control flow (KO 1.3)
template Templating
Knockout.jsHow is it different?
Automatic dependency
tracking
Declarative bindings
Integrated templating
http://knockoutjs.com
SignalRPersistent connection between JS and ASP.NET
~ 1 year old; active community
Community project
(not run by Microsoft)
Open source JavaScript library
(MIT license – source on GitHub)
SignalR
ASP.NET
JavaScript
Server
Brow
ser
Long polling / web sockets
SignalR
SignalR
SignalR
More information
http://knockoutjs.com
http://signalr.net
http://learn.knockoutjs.com
http://knockmeout.net
Questions?
Ægir Þorsteinsson
Landsbankinn@thorsteinsson
http://thorsteinsson.is/