Silverlight is dead! Long live MVVM!

Report
Silverlight is dead!
Long live MVVM!
[email protected]
A long time ago…
… when all we had were
Win Forms…
… Microsoft released
Silverlight /WPF
What’s
changed?
Declarative UI (XAML)
UI thread belongs to the UI
Your Weather App is not responding
UI thread belongs to the UI
Non absolute layouts
MVVM & Data Binding
View Model
View
Model
MVVM – Model View ViewModel
Boring diagrams
Separated presentation
View
Presentation
Logic
Domain
Objects
Different responsibilities
View
Presentation
Logic
When user name
entry is empty,
disable submit button
Domain
Objects
User name
cannot be empty
MVVM - Structure
Invoke Commands
Change notifications
DEMO TIME
Old (ancient) idea
View Model
!=
Code Behind
DEMO TIME
This MVVM thing is
pretty cool.
Silverlight RULEZ!
Silverlight is
DEAD!
Silverlight is dead – O RLY?
• Silverlight 5 is a complete platform
– Support through 10/12/2021
• WP 7.5/8
• WPF
• Yup, it is pretty dead on the web…
Separated presentation in a browser
MVVM in the browser
View Model
View
Model
1032
pages
172 pages
MVVM in the browser
View Model
?
View
Model
Declarative
Bindings
Automatic UI
Refresh
Dependency
Tracking
Templating
DEMO TIME
KnockoutJS Demo
• MVVM pattern
– Data binding
– Observables
– Commands
• Custom bindings
• Promises and Deferred objects
Final (almost) thoughts
• Silverlight is dead (on the web)!
• JavaScript is here to stay… we need client side
code…
• JavaScript has good parts
– Object oriented
– Functional
– Dynamic
Final thoughts
• There is more to explore and learn
– HTML5, CSS3
– REST, JSON
– Web Sockets
– Web Storage
– Worker Threads
– Canvas
– Audio/Video
Technology
changes – focus
on principles
Knockout @ Making Waves
Activity Feed (activityfeed.codeplex.com)
Forms Designer

similar documents