balexandre
balexandre

Reputation: 75083

.NET Plug In ... where to go

I'm writing a Windows Application that connects to a webshop through it's API and reads/writes values.

The Webshop can have multiple Payment gateways and I was thinking about writing a plugin to each one and create a user interface that will be available to select each one and load the correct assembly...

my idea is to have multiple Libraries (.dll) and load the correct one once set up...

I do think this is kind'a late 80's developing so I wonder if there is anything new that could help me develop such behavior on .NET 3.5 SP1

I'm new to this matter, and for that I would ask you what is the best way to approach this.

Thank you.

P.S. I read about MEF (Managed Extensibility Framework) but it's still preview (MEF Preview 8 is the current), and only be available on .NET 4.0 so I can't go that way :-(

Upvotes: 0

Views: 133

Answers (2)

Martin Harris
Martin Harris

Reputation: 28617

There are a number of helper classes added into .NET 3.5 in the System.Addin namespace. These help out with a lot of the boiler plate code and more difficult aspects of this kind of development (such as loading and removing plugins at both startup and runtime as well as code isolation), but they still follow the basic pattern that you've described.

I haven't personally used them in real world code, but I have had a mess around with them and they appear at first glance to work well enough.

An overview can be found here.

Upvotes: 1

Rory
Rory

Reputation: 2742

Take a look at MEF and Unity, they are two very useful projects from Microsoft that should help with extensibility in your app (MEF is actually used inside VS2010 to support extensions).

Upvotes: 2

Related Questions