[Solar-talk] Somehow nested controllers / Support for multiple applications

Andreas Ravnestad andreas.ravnestad at gmail.com
Wed Jun 6 06:19:31 PDT 2007


<This is an IRC-induced email. Please forgive me if it is slightly tough 
to grab the context>

Here's my problem: my company needs a set of different applications 
which may share some code (some crazy SOA business, without going into 
detail). If I create one single Solar application and emulate multiple 
applications using page controllers, the page controllers will quickly 
grow huge (like really huge!). From my point of view, Solar seems to 
lack support for working with *several* applications inside *one* Solar 
instance.

I could simply set up several Solar instances. But this means a whole 
slew of code duplication. Not to mention I would have to mess around 
with php include paths (for view/layout/helper/etc sharing) and probably 
lots of other details.

I could probably also subclass Solar_Controller_Front and use some url 
parsing and trick Solar into running appropriate page controllers.

I don't feel comfortable with these solutions. To illustrate further, 
here's an example of what I want to do with a single Solar 
instance/installation:

    http://domain.com/application1/page1/action1
    http://domain.com/application2/page1/action1
    http://domain.com/application3/page1/action1
    http://domain.com/application4/page1/action1

(Note: the page1 controller is different in application1 and 
application2 etc, it's not the same page controller!)

How can this be done?

Also note that this is the third time I am running into this problem. 
Previously I solved it with using dynamic subdomains and some nifty 
hacks, but this is not possible this time. It seems to me this must be a 
very common problem.

-Andreas R


More information about the solar-talk mailing list