views:

641

answers:

2

Our company has a fairly large ASP.NET web application. The app is already broken up into distinct 'areas' of business functionality. I'm looking for some strategies we can use to split this web application into separate buildable/versionable modules.

Primary goal being to:

Enable us to deploy the web app with only select areas of functionality.

I envision the parent web app as a 'shell' that can host 'plugins' which can register themselves as menu items on the parent web app's navigation hierarchy. The parent web app would contain the master page, stylesheets and common controls used by the plugins.

What kinds of ideas do you have for implementing something like this?

+3  A: 

I would do sub-web projects. Each website is a sub-project of the parent website. You can write an HttpModule that checks some data store to see if that customer has access to that site (module) and deny access in that way. Scott Guthrie has a nice post about how to set up sub web projects here.

Robert C. Barth
+1  A: 

One easy way to do this would be to simply use a SiteMap. You can segregate your aspx files and compile different dll's all you want. The SiteMap is completely independent and can be configured however you want to include whatever modules you want, with whatever permissions you want. There's no real need for any code modules to register themselves with other code modules. This is ASP.NET, each request is independent and can start at any aspx entry point. As far as your pages are concerned, enabling cross-module functionality is as simple as providing a link to a page in another module. The SiteMap accomplishes this handily.

sliderhouserules
I would imagine he wants to limit access to the other modules due to licensing agreements and whether or not the customer paid for them.
Robert C. Barth
Even for packaged software, it would still work. A single module consists of ASPX files and a dll. If you have only 2 of N possible modules installed on a given system, then the SiteMap can either be customized to not include the not included modules, or each module has unique permissions.
sliderhouserules