Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Dependency Injection in Silverlight

7,307 views

Published on

Designing Loosely Coupled Applications

Published in: Technology

Dependency Injection in Silverlight

  1. 1. Better Application Design
  2. 2. Better Application Design Caleb Jenkins “ Dependency Injection Microsoft Silverlight ” with
  3. 9. email [email_address] Caleb Jenkins Principal Consultant blog developingUX.com twitter . com/calebjenkins Sample code at: http://developingux.com/ioc
  4. 10. developingUX.com www.ImprovingEnterprises.com http://CommunityCast.tv http://ineta.org
  5. 11. Dependency Injection, Inversion of Control and the Strategy Pattern
  6. 12. Dependency Injection, Inversion of Control and the Strategy Pattern
  7. 13. Our Hero
  8. 14. has a quest
  9. 15. to slay the dragon
  10. 16. Our Hero The Dragon
  11. 17. The Dragon
  12. 18. but what if we wanted to
  13. 19. but what if we wanted to rescue the princess,
  14. 20. but what if we wanted to defend the castle rescue the princess,
  15. 21. but what if we wanted to defend the castle use a horse and lance? rescue the princess,
  16. 22. ?
  17. 23. The Dragon
  18. 24. a better way or
  19. 35. <ul><li>DI is: </li></ul><ul><ul><li>More Flexible! </li></ul></ul><ul><ul><li>More Configurable! </li></ul></ul><ul><ul><li>More Testable! </li></ul></ul>
  20. 39. IoC / DI Frameworks http://www.castleproject.org/ http://www.springframework.net/ http://ninject.org/ http://www.codeplex.com/unity Policy Injection Application Block structuremap.sourceforge.net
  21. 43. Interceptors and Listeners The Knight is off to Slay the Dragon! The Knight just slayed the Dragon! It took :22 seconds!
  22. 44. Interceptors and Listeners Slay the Dragon Security Must be a King with a Beautiful Reward Multi-Threading Invoke UI Thread Logging Knight is about to Slay the Dragon
  23. 46. <ul><li>Most “complete” stack </li></ul><ul><ul><li>ASP.NET Mono Rail </li></ul></ul><ul><ul><li>Micro Kernel </li></ul></ul><ul><ul><li>Windsor Kernel </li></ul></ul><ul><ul><li>Active Record </li></ul></ul><ul><ul><ul><li>nHibernate </li></ul></ul></ul><ul><li>Visual Studio Tooling </li></ul><ul><li>Mature Community </li></ul><ul><li>Integrates with ASP.NET MVC </li></ul><ul><li>ASP.NET | Sharepoint </li></ul><ul><li>Winforms | WPF | WCF | WF </li></ul><ul><li>Console Apps </li></ul>http://www.castleproject.org/
  24. 48. <ul><li>“ Spring Framework” is THE way to do JAVA development </li></ul><ul><li>Spring .NET is the .NET equivalent </li></ul><ul><li>Perfect bridge for Java Spring developers moving to .NET </li></ul><ul><li>Interface 21 </li></ul>http://www.springframework.net/
  25. 50. <ul><li>My current DI “crush” </li></ul><ul><li>Light weight / super fast </li></ul><ul><li>DI (Integrates with Castle for IoC / AOP) </li></ul><ul><li>.NET </li></ul><ul><li>Silverlight </li></ul><ul><li>Windows Mobile </li></ul><ul><li>No XML Config (Fluent Config) </li></ul>
  26. 52. <ul><li>From Microsoft </li></ul><ul><li>Integration with other Application Blocks </li></ul><ul><li>Microsoft Support </li></ul>http://www.codeplex.com/unity http://www.codeplex.com/ObjectBuilder
  27. 53. http://www.castleproject.org/ http://www.springframework.net/ http://ninject.org/ http://www.codeplex.com/unity Policy Injection Application Block structuremap.sourceforge.net
  28. 54. Not Covered
  29. 56. http://www.infragistics.com/hot/silverlight.aspx#InfragisticsandSilverlight
  30. 57. Not Covered
  31. 58. Not Covered Type Converters Sockets Deployment Options DataGrid Dynamically Loading Assemblies WCF Integration Advanced Debugging More More More More More
  32. 60. Questions?
  33. 61. copyright
  34. 62. [all images in this presentation are the property and copyright of their owners… Most of which I just found on the Internet and really have no idea who that might be.] copyright
  35. 63. email [email_address] Caleb Jenkins Principal Consultant blog developingUX.com twitter . com/calebjenkins
  36. 64. developingUX.com www.ImprovingEnterprises.com http://CommunityCast.tv http://ineta.org
  37. 65. Thank you Sample code at: developing ux .com / ioc

×