views:

59

answers:

1

This is kind of based off of this question.

I'm currently looking at rebuilding our company intranet from the ground up (I'll be honest, our existing one is an absolute mess), but one of the core "features" of our new intranet that I'd like is the ability to build whole applications (which will also probably be in MVC 9 times out of 10, the other being standard webforms) as modules that provide additional functionality to the core or a module that creates a while new application within the core (for example, how Joomla does it) that just plug-in to the core application by say dropping them into a directory once they're completed, and at some point be able to enable and disable them from an admin interface.

I'm looking at MEF and trying to get my head around it at the moment, although I'm also taking a look at MvcContrib Portable Areas, and wondering if that's a feasible alternative for what I'm trying to do.

I was just wondering if this was the best choice for trying to get me to where I want to be or am I going about using MEF as the element to provide this function completely wrong?

Can I even do what I'm trying to do in MVC?

+2  A: 

My personal preference is Portable Areas, but also have a look at the Orchard project in Codeplex. They have a very efficient plug-in mechanism, though somewhat complex.. It all depends on how much 'knowledge' of the core application you would expect authors of the plugins to have.

Clicktricity
Well, as we'll also be writing the plugins ourselves, we should know the whole system...at least I'd hope we would! :) But the benefit for us of being able to just build an app, drop it into a directory for example would be that as we take on new developers we can get them building new apps straight away without having to take them through a lengthy process of how the intranet is built, etc in their first few days
Liam
Additionally, would you happen to know how that would affect the routing?For example, I'd like to build an IT Helpdesk module for it, and I'd assume the routes for creating tickets would be along the lines of `http://intranet/IT/Helpdesk/Tickets/Create` or something similar. If it was a module, would it cause any issues with that route?
Liam
Both the portable areas and Orchard solutions have mechanisms to register routes from the 'dropped in' module. So assuming the routing follows some basic rules then you should be fine. If you become familiar with building your solution using MVC areas then making them 'portable' is very straight forward.
Clicktricity
I might just be being thick, but this article http://www.lostechies.com/blogs/hex/archive/2009/11/03/asp-net-mvc-portable-areas-part-3.aspx states that to add my Portable Area to the applications, I need to add a reference to the parent application, which I'm trying to avoid having to do so that the parent app doesn't need to be re-deployed. Though I could have overlooked something entirely that says I don't need to do that?
Liam
You do currently need to initialise the message bus, though the example provided could be improved through reading from some config settings. Its not perfect, but its a relatively straight forward mechanism compared to other alternatives.
Clicktricity
Ok. Any thoughts on if I decided to use Web Forms instead of MVC?
Liam