Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Structuring Application Question 1

Status
Not open for further replies.

csutton

Programmer
Dec 27, 2000
213
US
Hi all,

Moving from VB/C# development to PHP and beginning to love it. Anyway, here is a question:

I'm writing a web app, and it is basically to allow businesses to track their clients (this is a specialty app, not your run of the mill CRM). I plan on doing all the hosting for it, etc. In the end, there will be two types of users accessing it: the businesses and their clients (to register for classes, get documents, etc).

This is not directly related to PHP except I'm doing it in PHP/Codeigniter, but I'm not sure if that will make any difference at this point.

Ok, here is the question: My original plan was to have seperate databases and application folders (basically virtual hosts) for EACH business. So, Company A would have a database DBCompA and Company B would be DBCompB. It would be accessed either thru their own domain pointing to my server and virtual host directory, or thru a sub-domain url of mine.

The idea is Company A would never be able to see company B and each could have minor modifications done to their site, without effecting the others.

Only issue I really see is maintenance when upgrades come along, as I would have to do each site individually.

Any ideas if this is a good plan or a bad plan?

thank you!

~~ Chris ~~
 
It can work. You can also connect to multiple databases from PHP, so you can have a "common" database and a client-specific one, for example.

You can make each site include common code (the "engine" of the site. You can also keep code shared in a source code control system, like subversion or git. If you are hosting the sites yourself, nobody is stopping you from installing them on the server.

This also applies to the database(s). You will have to upgrade the databases separately, but that does not need to be a problem. You can do a lot with scripts on the server: Put an "temporarily out of order" message there, update the code, update the database, remove the "out of order". You can have each site updated in, say, a minute.

I give an example to this in:

You may also need modular and repeatable SQL scripts:



+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top