Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practices for implementing an addin/addon/plugin strategy

My application should be extensible. For my own needs I have implement some services. These services are based on the IoC/DI princple. So the services encapsulate the concept of the application.

For exsample, there are an IApplicationService. The ApplicationService exposes information about the current exceuting application. There are specified the AssemblyInfo and so forth. An other exsample is the INavigationService(see mef.codeplexcom in the samples). This services provides some properties where are information about the current selected item specified and also some events.

I think, that the "service approach" is the easiest and simplifies the extension points for the application. So, I am not sure that this is really the best approach. What do you think? How do you would implement "extensions points" in an application like addins/addons/plugins ... ?

Thanks in advance for your replies! And sorry, my english is poor. ;)

like image 985
Carnation Avatar asked Jul 25 '10 13:07

Carnation


2 Answers

Are you familiar with MEF (Managed Extensibility Framework)?

The Managed Extensibility Framework (or MEF for short) simplifies the creation of extensible applications. MEF offers discovery and composition capabilities that you can leverage to load application extensions.

like image 196
CD.. Avatar answered Sep 28 '22 21:09

CD..


You seriously need to look at MEF - the Managed Extensibility Framework.

  • Managed Extensibility Framework Overview
  • Building Composable Apps in .NET 4 with the Managed Extensibility Framework
  • MEF on Codeplex

It's a great new framework that Microsoft itself is using in e.g. Visual Studio 2010 for its extensibility story. Great and easy to use - why reinvent the wheel when you can use something that thousands of dev will use shortly??

like image 41
marc_s Avatar answered Sep 28 '22 22:09

marc_s