[Solar-talk] Somehow nested controllers / Support for multiple applications
Paul M Jones
pmjones at ciaweb.net
Wed Jun 6 07:08:28 PDT 2007
On Jun 6, 2007, at 8:53 AM, Rodrigo Moraes wrote:
> On 6/6/07, Andreas Ravnestad wrote:
>> 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.
>
> I think it is. As we were talking on IRC, Antti has in Abovo the
> concept of 'modules' - which are sub-apps placed inside an app folder.
> Correct me if I'm wrong, Antti - they extend an app an allow to
> organize app-families inside folders - so you can have app1/page1 and
> app2/page1 with two different page1 controllers.
>
> Abovo's front controller [1] basically adds one more level to an app
> folder, allowing to organize some kind of 'sub-apps'. I think it is an
> useful idea.
This is just what I was going to suggest. Good call guys. :-)
Andreas, you might extend the front-controller to recognize multiple
leading path elements that indicate not only the page-controller, but
also the application or module name. Then a URI like this ...
/appname/module/pagectl/method
... could map to Appname_Module_Pagectl::actionMethod(), and then the
page-controllers themselves won't require extending.
I'm afraid building that into Solar_Controller_Front isn't going to
happen soon, simply because paying work is at the top of my priority
list. However, if someone hits on a solution that is nicely
configurable and works with existing apps, I'd be thrilled to review
it for inclusion in Solar proper.
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Join the Solar community wiki! <http://solarphp.org>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list