2

I need to create/publish a complex MVC site to several clients, each with mostly shared functionality but also custom stuff, such as client specific controllers / views / business logic etc. Most insist on hosting the site themselves, and have functionality they don't want others to know about.

Following reading this SO post and this, I've created a means for MVC Multi-tenancy, which seems to handle most scenarios.

As I can't attach to Stack Overflow, I have posted it here (no need to read it all - it's mostly screenshots!).

The basis is to have a generic project, referenced by several client projects. The client project can then have a similar structure to the generic and take precedence when I wish to use overriding code/controls/views.

As it's the foundation of the whole thing, I don’t want to implement something only to find everyone else does it in an easier/ better way.

My question is a bit wooly, but simple - Is there a better way?

Community
  • 1
  • 1
JsAndDotNet
  • 16,260
  • 18
  • 100
  • 123
  • I would suggest distilling your issue into a question that can be answered. Otherwise post on [code review](http://codereview.stackexchange.com/). – Davin Tryon May 08 '13 at 16:30
  • @DavinTryon Code Review is for reviewing actual working code, not questions like this one. Please don't suggest people to use another site if you don't know that it's actually appropriate. – svick May 09 '13 at 12:29
  • I tried this, I copied web.config in tmp/views/ from generic /views and I didn't have to inherit from System.Web.Mvc.WebViewPage in hundreds of views and partial views. Plus I can still use @model in Views as per normal. – eadam Aug 20 '13 at 04:57
  • Thanks for the heads up. That part did feel a bit clunky. – JsAndDotNet Aug 21 '13 at 12:19

1 Answers1

1

Your architecture seems about right. I would just say that you have to be really careful about the generic thing and how the client's addons will talk to the core application.

I would do that by having a base project in the CVS with client's specific branchs referencing it (as in git submodule) so everyone can beenfit from the core.

Rolling out production and QA versions are also something that must be dealt with caution as you can end up with different version far from each other depending on the client.

tucaz
  • 6,524
  • 6
  • 37
  • 60