Architecting Silverlight Applications

3,221 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,221
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Architecting Silverlight Applications

  1. 1. Architecting Silverlight Applications<br />
  2. 2. Shawn Wildermuth <br />shawn@agilitrain.com<br />http://agilitrain.com<br />C# MVP, MCSD, INETA Speaker<br />Silverlight Insider, CSD Insider, Data Insider<br />Book Author <br />Pragmatic ADO.NET<br />MCTS Training Kit (Exam 536)<br />MCPD Training Kits (Exams 547, 548 & 549)<br />Windows Phonebook (Upcoming)<br />Silverlight Architecture (Upcoming)<br />Silverlight Tour (www.silverlight-tour.com)<br />Who Am I?<br />
  3. 3.
  4. 4. Tight Coupling<br />Adds Complexity<br />Simple Changes Cascade<br />Difficult to Test<br />Difficult to Develop Large Applications<br />The Problem<br />
  5. 5. Loose Coupling<br />Layers are Individually Responsible<br />Established Patterns<br />Lessens the Need to Reinvent Architecture<br />Separation of Concerns<br />
  6. 6. Model-View-Controller<br />Model-View-Presenter<br />Model-View-ViewModel<br />Patterns<br />
  7. 7. XAML is Declarative<br />Allows for Code-less Views<br />Older Patterns Don’t Fit<br />Patterns (2)<br />
  8. 8. Patterns Work for You!<br />Benefit is common solution to a problem<br />No solution is perfect<br />Using Patterns does not make you an architect<br />Religiosity of a pattern isn’t helpful<br />The Caveat<br />
  9. 9. Patterns Aren’t Dogma!<br />
  10. 10. Model-View-ViewModel<br />View<br />ViewModel<br />Model<br />
  11. 11. Silverlight<br />Model-View-ViewModel (2)<br />XAML<br />View<br />C#/VB<br />ViewModel<br />Model<br />Internet<br />Server<br />C#/VB<br />Services<br />
  12. 12. Typically One-to-One ViewModel to View<br />Not uncommon to have 1..n ViewModel/Views<br />Single Model is also common<br />Responsibilities<br />Model Should Handle CRUD (or Services)<br />ViewModel Should Expose a Bindable Surface<br />View Should Format Data as Necessary<br />Mode-View-ViewModel (3)<br />
  13. 13. Planning on MVVM<br />Build in Tiers<br />Plan for Testing<br />Building the MVVM<br />
  14. 14. The ViewModel<br />Expose API that the View Needs<br />Use the Model to Provide the Data<br />Building the MVVM (4)<br />
  15. 15. The View<br />Use as Much XAML as Possible<br />Don’t Write Code to Rebind Data<br />Perfect View is Code-less<br />In Blend Behaviors and Element Binding Help<br />No Such Thing as a Perfect View<br />Building the MVVM (6)<br />
  16. 16. Demo – Building MVVM<br />
  17. 17. MVVM is Still Growing<br />Some Frameworks Support it (e.g. Prism)<br />Philosophy of Specifics is not settled<br />View-Centric<br />ViewModel-Centric<br />Marriage/Mediator<br />No Completely Right/Wrong Way to Implement It<br />Patterns Only Good If They Help<br />Evolving Pattern<br />
  18. 18. The Problems<br />Monolithic Application<br />
  19. 19. The Problem (2)<br />Large Projects<br />Why should you build everything?<br />Slows down development<br />Leads to bleed over<br />
  20. 20. The Problem (3)<br />Versioning<br />One .xap: Atomic Versioning<br />Complex Apps Need Better Version Story<br />
  21. 21. Composite Applications<br />Composite Applications<br />
  22. 22. Not just MVVM or DI<br />Separate Notions of FX<br />Core<br />Modules<br />Services<br />Separating Concerns<br />
  23. 23. Frameworks Help <br />Laurent Bugnion’s Light MVVM<br />http://www.galasoft.ch/mvvm/getstarted/<br />Nikhilk Kothari’s FX Framework<br />http://projects.nikhilk.net/SilverlightFX<br />Michael Sync’s Silverlight MVVM Toolkit<br />http://silverlightmvvm.codeplex.com/<br />Microsoft’s Prism and MEF<br />http://compositewpf.codeplex.com/<br />http://mef.codeplex.com/<br />Caliburn and Caliburn Micro<br />http://caliburn.codeplex.com/<br />Frameworks<br />
  24. 24. Links:<br /><ul><li>My Blog:
  25. 25. http://wildermuth.com
  26. 26. Presentation and Code Available There
  27. 27. Silverlight Tour:
  28. 28. http://silverlight-tour.comn@agilitrain.com</li></ul>Questions?<br />

×