extensibility with sl4 and mef (en)

24

Upload: nuno-godinho

Post on 06-May-2015

1.221 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Extensibility with sl4 and mef (en)
Page 2: Extensibility with sl4 and mef (en)

Construção de Soluções Extensíveis com Silverlight 4.0 e MEF

Nuno Godinho – Independent Consultant

Page 3: Extensibility with sl4 and mef (en)
Page 4: Extensibility with sl4 and mef (en)

Nuno Filipe GodinhoIndependent Consultant

Mail: [email protected]@sapo.pt

MSN: [email protected]

Blogs: http://pontonetpt.com/blogs/nunogodinhohttp://xamlpt.com/blogs/nunogodinhohttp://weblogs.asp.net/nunogodinhohttp://msmvps.org/blogs/nunogodinho

Twitter: NunoGodinho

About Me

Page 5: Extensibility with sl4 and mef (en)

Agenda

Page 6: Extensibility with sl4 and mef (en)

• Introduction to MEF• MEF and MVVM• Solution Modularity• Event Aggregation• Summary

Agenda

Page 7: Extensibility with sl4 and mef (en)

Introduction to MEF

Page 8: Extensibility with sl4 and mef (en)

• What is MEF - Managed Extensibility Framework?“MEF makes building extensible apps, libraries and frameworks easy” – Glenn Blockhttp://blogs.msdn.com/b/gblock/archive/2008/09/26/what-is-the-managed-extensibility-framework.aspx “New library in .NET Framework 4 and Silverlight 4 that addresses the extensibility problem by simplifying the design of extensible applications and components” http://mef.codeplex.com/

Introduction to MEF

Page 9: Extensibility with sl4 and mef (en)

• Basic ConceptsAn Application is built using parts

Introduction to MEF

Page 10: Extensibility with sl4 and mef (en)

• Basic Concepts

Introduction to MEF

1. Import

2. Export

3. Compose

Modules

Functionalities

View ModelsApplication Parts

PagesActions

Shell Application

Page 11: Extensibility with sl4 and mef (en)

MEF and MVVM

Page 12: Extensibility with sl4 and mef (en)

DEMO:ViewModel Injection

Page 13: Extensibility with sl4 and mef (en)

DEMO:ViewModel Extensibility

Page 14: Extensibility with sl4 and mef (en)

Solution Modularity

Page 15: Extensibility with sl4 and mef (en)

DEMO:Dynamic XAP Loading

Page 16: Extensibility with sl4 and mef (en)

DEMO:Dynamic XAP Navigation

Page 17: Extensibility with sl4 and mef (en)

Event Aggregation

Page 18: Extensibility with sl4 and mef (en)

DEMO:Event Aggregation

Page 19: Extensibility with sl4 and mef (en)

Summary

Page 20: Extensibility with sl4 and mef (en)

• We can achieve a very high degree of Extensibility in our Applications by using MEF

• MEF with MVVM is possible and can give us:– ViewModel Injection– ViewModel Extensibility– ...

Summary

Page 21: Extensibility with sl4 and mef (en)

• Our Solutions sparsed into several XAP’s to gain Performance

• Solutions can be much more easily integrated maintaining the loose coupling, using Event Aggregation

Summary

Page 22: Extensibility with sl4 and mef (en)

Break the Coupling …Extend their limitsTightly Coupled

Summary

MEF

Page 23: Extensibility with sl4 and mef (en)

Nuno Godinho Partner @ [email protected]

Page 24: Extensibility with sl4 and mef (en)