I have to develop 3 different sites video.com for hosting video audio.com for ho
ID: 651385 • Letter: I
Question
I have to develop 3 different sites
video.com for hosting video
audio.com for hosting audio
docs.com for hosting docs.
domain names for example only
Almost 80% of the functionality is the same for all the three, with remaining 20% being completely different features...
How do I handle this? How does sites like SO handle this?
I am developing this in YII framework and was thinking of having these different features as modules but in this case the menu/code links in html code can become difficult.
Explanation / Answer
The way we've done it at companies I've worked at is that we have a common code line in source control. This is where that 80% of code lives. It is 100% functional and could be deployed on it's own if needed. It's like the vanilla website.
When a new website comes along that needs to build on this base, we branch the code from the common line into a new project. All customization are done in that branch with releases coming from there.
If a bug in the common code is discovered in a project, then it is fixed in the common line and then pushed to all the projects so that all projects get the fix. You never push from a project site down into common code, you always push from common code out to project sites.
As for skinning a site. Using CSS helps a lot. I follow Jeff Atwood's blog, Coding Horror, and he did a post that really helped us out. It was how I was introduced to less. It goes into how the Stack Exchange network is able to skin their sites quickly and easily.
You can find the post here. I'm not sure if there is a way to use it in php, but it's something to look into. It has been a life saver for us at my current company.