360 likes | 518 Views
Silverlight is dead! Long live MVVM!. maciej.grzyb@makingwaves.pl. 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.
E N D
Silverlight is dead!Long live MVVM! maciej.grzyb@makingwaves.pl
UI thread belongs to the UI Your Weather App is not responding
MVVM & Data Binding View Model View Model
MVVM – Model View ViewModel Boring diagrams
Separated presentation View Presentation Logic DomainObjects
Different responsibilities View Presentation Logic When user name entry is empty, disable submit button DomainObjects User name cannot be empty
MVVM - Structure Invoke Commands Change notifications
This MVVM thing is pretty cool. Silverlight RULEZ!
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 Domain Objects
MVVM in the browser View Model View Model
1032 pages 172 pages
MVVM in the browser View Model ? View Model
Simplify dynamic JavaScript UIs by applying the Model-View-View Model (MVVM) pattern Declarative Bindings Automatic UI Refresh Dependency Tracking Templating
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
Knockout @ Making Waves Activity Feed (activityfeed.codeplex.com) Forms Designer