Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managed Extensibility Framework (MEF) vs. Composite UI Application Block (CAB)

We are currently looking at either using CAB or MEF for our next application. I didn't see any examples on codeplex of how event brokering is handled for sibling control communication, maybe I missed it. How does inter-control communication work in MEF?

Also, we are planning on using Infragistics which has provided additional components for the CAB framework. How well will Infragistics controls integrate into MEF?

Overall, is MEF worth pursuing for a decently large, 15,000 hours of strictly development, application?

like image 835
blu Avatar asked May 22 '09 15:05

blu


2 Answers

I may be wrong but I don't think that MEF has any event brokering. It is a general composition engine similar to ioc containers but intended for a more general plug-in and application extensibility solution. CAB and Prism on the other hand are UI frameworks that allow composite applications that're made up of UI components. Since UI components will most likely need to communicate with each other and respond to activities in other UI components, the underlying framework needs to provide a mechanism for eventing (pub/sub) between UI components.

like image 199
Mehmet Aras Avatar answered Oct 01 '22 03:10

Mehmet Aras


If you are using MEF with WPF and the MVVM pattern, then your parts typically export ViewModel classes and View classes (e.g. DataTemplates, etc.). Your View binds to the ViewModel and uses dependency properties and commands to communicate back and forth. Therefore, if Part A needs to communicate with Part B, then Part A can Import a reference to Part B's ViewModel and they can make method calls back and forth. Part A can also register event handlers for Part B's events, etc.

like image 36
Scott Whitlock Avatar answered Oct 01 '22 03:10

Scott Whitlock