Welcome Guest, Not a member yet? Register   Sign In
large application structure
#1

[eluser]johnnybravoh[/eluser]
Hello all,

I'm developing an application that has to potential to be pretty large. I'll try to be as descriptive as I can without giving too much away because my client would like the development kept under wraps until release...

Basically the application is a service provided to different entities that use common functionality, but may need functional and aesthetic customization.

Customers access the app by going to cust_name.application.com. My thought is to have a codeigniter structure and in the router set a session variable equal to the cust_name. That way when a customer visits cust_name.application.com/service, the service controller is called and I know whether to do anything special based on the session var.

I keep thinking that I should do something like create a customer specific service controller that extends the base service controller and route cust_name.application.com/service to cust_name.application.com/cust_name_service, but if I've got hundreds of customers, I would have hundreds of customer controllers, all extending the base service controller which seems clunky and not quite right.

I'm historically not an OO programmer, but I fully understand OOP. My mind just doesn't think in OO terms quite yet.

Am I making sense? Any ideas? There will be many more controllers than just /service. I simply used /service as an example.


Thanks!

Jon
#2

[eluser]TheFuzzy0ne[/eluser]
Maybe I'm thinking too simply here, but it sounds to me like you should simply have a config file and a different theme, for each app, and both of those can be determined by the subdomain name, you don't even need cookies for that, let alone session variables. Smile
#3

[eluser]johnnybravoh[/eluser]
That would work well for theming the site, but there are some functional differences too and that's where I'm not sure how to structure things.
#4

[eluser]TheFuzzy0ne[/eluser]
What kind of functional differences? Can that not be implemented by way of a library? A common library, and an individual library where needed, overriding the common library? Your libraries/functions can be loaded just like the config/theme. Without know what the functional difference are, and the frequency/ratio, it's hard to comment.




Theme © iAndrew 2016 - Forum software by © MyBB