tags:

views:

84

answers:

3

Hey Guys, OK. we are currently on a plan to develop a website for 3 same company. The main difference would be just the look and maybe a couple of extra question for one or two company.

Currently each company have their own website and when they required a new function we have to re-code all three website or when one wants a new function just one website update.

What we wanna accomplish is to create ONE website that could house all these 3 website. Most of these website function are the same like 90% function is the same I figure out the different look which can be done changing the website style-theme..

But we have problem tackling the functionality of if one company wanted to add something. So if we wanted to update a function we just wanna do a change in one function and that should apply for all.. And if one function is required for one company then just add the new fucntion and assign it to 1 company...

How do u structure something like this..

We wanna be able to control what being displayed based on the company and also the fucntions available.

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

+1  A: 

Put shared functionality in a common assembly, and reference that assembly in your 3 websites. There's not necessarily a trivial solution.

Bryan Ross
Agreed. I mean its like having libraries in programming. Keep the website look and feel separate from the core functions. And just update the "library" when needed.
chutsu
First of all thank you for your reply, Right now every function we have is done via web service. I'm a beginner at this, how would i put all this web service into one common function?
A: 

I've tried doing this with shared libraries and also by having a single website in IIS and then using the domain to route the requests properly. There are a lot of things with User Controls (ascx) that get really confusing if you try to share them across multiple websites, even though it is possible to embed them as resources in an assembly and load them dynamically.

Once you are hosting all 3 domains in a single IIS site, to enable things to be different between the sites you can write some conditions based on the domain. As a more general point, you can create a class to hold your permissions and resources for features based on the domain 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, such as different image directories, css files, text resources, etc. that can also help keep your common features all together so you can just reference those resources that are different as needed while sharing all the common elements.

jarrett
thank you jarret.
A: 

You should be able to resolve most of the issues you want to solve with use of style sheets. Have each website reference the same style sheet, but then have them also reference their own unique style sheet which contains the differences for each website.

Tom Gullen