3 sites 1 Project

We are currently planning to develop a website for 3 companies. The main difference will only be the appearance and perhaps a couple more questions for one or two companies.

Nowadays every company has its own website and when a new feature is required we have to recode all three websites or when you only need a new feature to update one website only.

What we want to do is create ONE site that can host all of these 3 websites. Most of these website features are the same as 90% feature. I am figuring out a different look that can be changed by changing the theme of the website style.

But we have a functionality issue if one company wanted to add something. So if we want to update a function, we just want to make changes to one function and should apply to all.

And if one company requires one function, just add a new function and assign it to one company ...

How do you structure something like this?

We want to be able to control what is displayed on a company-by-company basis as well as the available features.

I just need some direction on how to do this. Right now, Inheritance is on my head to solve this whole problem.

+2


a source to share


3 answers


Place shared functionality in a shared assembly and reference that assembly across your three sites. Not necessarily a trivial solution.



+1


a source


I've tried doing this with shared libraries as well as using a single website in IIS and then using the domain to route requests correctly. There are many things with User Controls (ascx) that get very confusing if you are trying to share them across multiple websites, even though they can be injected as assets in an assembly and loaded dynamically.

Once you host all 3 domains in one IIS site to allow others to be different, you can write some terms based on the domain. More generally, you can create a class to hold your permissions and resources for domain-based functionality, so if you add another website in the future, you just need to implement that class for the new domain.



If you can isolate the differences in any other way, like different image directories, css files, text resources, etc., that can also help to bundle your common functionality so that you can just link to those resources that differ as needed by sharing all common elements.

0


a source


You should solve most of the problems you want to solve using stylesheets. Let each site link to the same style sheet, but then they also link to their own unique style sheet that contains the differences for each website.

0


a source







All Articles