Hi all,
We have developed a system that uses a single code base, consisting of 4 visual studio projects. with an admin website, and customer facing website. (each system has its own MS SQL database)
This has been working great as all new websites (including admin) reference the same code base projects, from within SVN, therefore any changes made to the code base is then available to all websites.
Each website has different a master page, and different user controls (.ascx), and therefore partially different although the main coding behind the sites are the same.
The issue we are having now is if there is a bug, a feature change or a new feature we have to implement it in ALL the sites seperately (for both admin and customer site). Which is starting to drive us insane, and also means we have a HUGE margin of error for implementing the changes.
I have thought about using svn:externals but this will become messy.
Branching from a master website and master admin system could be the option, but merging to get the new code is a major issue with the sited not being exactly the same.
I think a nice over view would be say that the markup is totally different per site (except the admin site, which is just a theme change) but the code bases are the same.
What is the best way to manage this or are we stuck doing a lot of copy and paste?
EDIT
Which points would you like clarity on?
Issues that arise are such as in page javascript, being different, html layouts can be completely different bewtween websites. But the code for the pages is the same.
So I would need to 'synchronise' file and folder such as those found in app_code. but there are issues here as well.
Site 1 and Site 2 could be exactly the same, just a different theme. Site 3 has a different theme as well, but it also has some bespoke code that is only required by this site, some of the code in app_code also acts differently to Site 1 and Site 2
Now I could easily acheive this with branching, but when merging up to the new branches, if there are code difference then there are going to be major conflicts.
Merging would also become a large task and take too long, as we would need to merge only certain folders and files, although you cannot merge a single file through the branch. (this could be wrong)
For example
In the root there is a download.aspx which returns a stream as the response rather than a page, this is used to push all the download requests through the system. So this page in Site 1 and Site 2 is the same, but in Site 3 it does something extra which no other site requires or needs. We dont want this bespoke feature to be an overload as we dont want/need it for the other websites, we can now no longer merge this file, from the master website, it must be manually merged.
Hope this explains better what I am trying to achieve
EDIT 2
Basic site structure
|- App_code
|- App_Themes
|- Bin
|- Content
| |- Flash
| |- Images
| |- Scripts
| |- Uploaded
|
|- Controls
| |- MasterPage
| | |-MasterPageControls
| |
| |- Navigation
| |- Search
| |- Templates
| | |- Control Templates
| | |- Page Templates
| |
| |- WebServices
|
|- Errors
|
Everything under Controls Navigation, Search, Templates is .ascx files
In the root there are several files including default.aspx, download.aspx and preview.aspx
These are the main pages for the website (ignoring Error pages) all pages are dynamically created from the DB
The Controls folder ise where most of the changes between websites happens in the MasterPage, and all other user controls