5

I have web application that are using multiple clients. I should create one copy of application for all clients or every client should have its own copy.

I am using Asp.net MVC and SQLServer. What you suggest.

mu is too short
  • 426,620
  • 70
  • 833
  • 800
Ali
  • 3,545
  • 11
  • 44
  • 63

2 Answers2

6

Creating seperate projects per client will be troublesome to maintain while a single project for all clients could be difficult to customize. It is a fine line and your needs will dictate how you build your solution.

One of my more recent projects where we do SAS (Software as a Service) we were able to build our MVC application using a plugin architecture so that each client COULD have their own DLL deployed to the BIN that would enable customizations for just that client (to the Views, Assets or even the Controllers). We are able to leverage a single code base and have many clients, most without customizations and some with minor to heavy customizations.

Every client has a unique URL for their "portal" and most often they have private domains, so http://app.mycompany.com or http://mycompanyapp.com and some are even hosted on our own site, http://hostingcompany.com/client/.

By building an application that can determine what client it is based on the URL we were able to handle all of these cases with ease. When we deploy we have a single code base (deployed just ONCE to a single folder) and all of the sites use that same code deployment.

We run a web farm where we have many .NET Web Servers and have load balancing setup and the sites all have ping pages that our load balancers interact with to determine their health.

Like I said, your needs will determine what the best solution for you is.

Nick Bork
  • 4,831
  • 1
  • 24
  • 25
0

Nick , what about database should we use one database every client or should have separate database for each client in my scenario our application is more database centric so there are lot of changes done for each client as per there business roles .

  • 1
    Sorry I didn't see your question since it wasn't a reply to my post. It can go either way so long as your database structure is build in such a manner that would support shared databases (use a CompanyID to split data or something). With the right structure you can easily roll off individual clients to their own install. In our case we have both, a single MASTER database that stores some master configuration like client-to-database mappings, list of domains the application answers for, etc. At any time we can move clients around (from shared to dedicated or dedicated to shared). – Nick Bork Jun 21 '13 at 22:51