I have a program that I have chosen to duplicate because it is being modified to meet the requirements of a completely different market. However, many aspects of the program, especially much of the content, will remain unchanged (for now). The particular market we are targeting is subject to regulation by the government, and having dealt with such situations before, I have learned that anything can change at any time.
I basically have two options to choose from:
Option 1: Don't duplicate the program. Make changes to the existing program based on user types. Option 2: Duplicate the program. Make necessary changes to templates and programming.
If I choose option 1, the code is going to become unmanageable very quickly with caveats littered throughout the code. It will also be difficult to make very large changes to the program.
If I choose option 2, and need to make a change to an area that is common between both programs, I'll have to do it twice.
I feel like both choices are a bad idea, and I feel like there must be a much better way to handle this issue. Is there anything else I can do?
How do you manage multiple programs that all do similar things?
StackOverflow seems to do this very well with their multiple StackExchange sites.
The project is a web application using PHP, HTML, CSS, JS, PostgreSQL, Apache and SVN.
Thanks in advance!