How to implement application variations

Hello all

I am developing a project for a client but I am implementing it with a generic domain name. The client and their users will log in with secure credentials checked against the default database records. After that Codeigniter will switch to using the client specific database.

Now, the application has value to other potential clients and there is much, certainly in data terms and also in logic / forms / reports that is common across the market.

But - and here's the thing - there are likely to be subtle differences. I plan to use a separate database for each client to take account of custom data requirements.

I will use HMVC to implementt modular functionality. I want to use the top-level domain follwed by module names - regardless of which client is logged in e.g.

What are my options as far as variations in the application are concerned?

Should I use one application folder with the base modules in the modules folder and then create discrete sub-folders for each client within controllers, models and views - e.g.

Or should I create discrete applications for each client - I am slightly reluctant to do this because much of the code would be common.

I have tested the changing of applications by reading an application folder variable from a text file when index.php is first loaded but how would I dynamically change the $application_folder variable after a user has logged in? Because index.php is first of all going to load the default application for user login. How can I change the $application_folder after that.

So, it's how to implement differences between client applications when those differences are not major - e.g.
slightly different business logic
different layouts for on-screen or printed reports
slightly different set of form fields to be filled in.

I hope I have explained the problem OK.

Any thoughts would be helpful.

Many thanks and best wishes to all


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.