[Solar-talk] closing: page controller & action, again
Paul M Jones
pmjones at ciaweb.net
Wed Jul 11 09:37:17 CDT 2007
On Jul 5, 2007, at 8:25 AM, Rodrigo Moraes wrote:
> Paul and everybody,
> After last night wonderings, I woke up and thought that it is ok that
> the page controller extract the action from a Uri_Action object -
> passed or built. This allows it to be used as a standalone object (I
> didn't knew it was used in standalone mode; it seems it is).
Yes, that is exactly the point -- I want the page-controller to be
independent of the front-controller as much as possible. It should
be (relatively) easy to completely replace the the front-controller,
or not use one at all, with respect to the page controller.
> Then the front controller mappings to actions should be done by
> building a "fake" uri with the action name in the first path. I've
> done this some times, but I was wondering if manipulating the uri was
> the best strategy to talk to the page controller (shifting/unshifting
> the uri path always seems tricky to me :).
Yeah, the page-controller expects a URI of some sort: string,
Solar_Uri*, etc. That way we can support a huge number of possible
inputs in their "natural" format (URIs).
> As it is also used independently of the front controller (not by me,
> he! :), things change a lot and it seems that this is indeed a good
> option to tell it which action to execute.
It makes me feel good to know that someone else has arrived at the
same conclusion as I did; thank you for taking the time to work
through this and confirm my opinion separately. :-)
--
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