views:

145

answers:

1

Hi there!

I'm working on an ASP.NET 3.5 site that is intended to be an intranet application. How would it be possible to create a kind of "plug-in" architecture, such that I can add additional functionality to the site without recompiling the site? I'm thinking of additional functionality as developing separate modules that can be compiled into DLL's that can just be "added" to the site. Dunno if this is the right way to go about this sort of stuff. I'm aware that DotNetNuke caters for this, and that you can develop 'modules' for it, but for the purpose of learning, I would like to know how this is achieved?

I dont know whether this is the route to follow, or if I should just cater for everything, and give certain functionality the ability to be turned on or off?

any thoughts? -thanx!

+1  A: 

This isn't as easy as it sounds.

The simplest solution is to use frames and fixed layout. Each frame would then request a specific page, which would be routed to a plugin. Rendering portions of a single page is much more difficult.

For discovery of plugins, the simplest solution would be a IOC framework, which could pick up your dependencies (plugins) for you.

James L
hey TopBanana! thanx 4 th reply. That was kinda what I was thinking of, except on perhaps a dashboard page, let the system discover the available plugins, show it as a navigate-able item, and then route the user to a page that houses the plugin functionality.
Shalan
IOC? is this something similar to what Spring.Net is based on?
Shalan
Spring.Net or Castle Windsor would both work. You could also roll something yourself looking for any assemblies within a given directory, then loading them into your App Domain. Then search through all the classes until you find one that implements IMyPlugin.
James L
Hi TopBanana. Thanx for the additional info. not familiar with what u describe in the latter part of your reply, but Im looking into Spring.Net currently and will certainly look into Castle Windsor. Thank you very much!
Shalan
In fact I should also have a look at MVC patterns in ASP.NET for trying to accomplish the same. I came across something on the net that described it, but didnt bookmark it!...google-time!
Shalan