views:

30

answers:

1

We have two websites that share some business processes and UI elements. Lets focus on a contrived example: we have an apartment rental site and a boat exchange.

For instance, on our apartment rental website, we may want to let users bid to buy boats. On our boat website, we may want to let users search for apartments.

An obvious solution would be to compile the views and controllers into a base project and inherit appropriately. So buying a boat on the apartment site invokes base.mvc which actually contains the veiws for both boats and apartments. So adding a new boat screen would require an apartment site rollout to get the functionality.

Another alternative would be to have the apartment site just forward any boatish requests to the boat site(or some boat site) and return appropriate html. This would make the front end sites little more than routing tables and css.

Surely some SO member has already had to solve this problem. Can anyone point out the pros and cons of these strategies? Can I benefit from your experiences? Is there a third strategy I'm missing?

+1  A: 

Have a look at the Portable Areas of MvcContrib: http://mvccontrib.codeplex.com/documentation?referringTitle=Getting%20Started

Dave