[Solar-talk] request: split the front controller, add a mapper

Rodrigo Moraes rodrigo.moraes at gmail.com
Sat Nov 4 21:57:58 PST 2006


On 11/5/06, Travis Swicegood wrote:
> Just something from my point of view here.  I'd add in some sort of use
> case showing how this is used, what it accomplishes, etc.  For me it's
> much easier to review code with a "here's what I was trying to
> accomplish, here's the API I used to accomplish it."

Hi, Travis.
Sorry, I'll try to add more examples. Basically it is a router, or a
url mapper, and I thought the uses were clear.

For example, all Solar apps are accessed using
/controller/action/params. Suppose you have a online newspaper with
various sections and subsections. Instead of having url's like
/news/sports, you can have /sports/football, without the need to have
a "Sports" app. You tell the router that "/sports/*" go to App_News.

"Here we allow the bookmarks app to be accessed in the url path
/links" -> this is a simple example to make url paths for the
Bookmarks app independent of the controller/action names. There is
still a issue to make the action() helper to build the links based on
the current route being used.

Well, maybe I should not have put this under "proposals". It is just
something I needed and I was happy to achieve this in a more-or-less
simple way, adapting the router from Zend.

rodrigo

---------------------------------------------------------------------
Solar has now a Community Wiki: solarphp.org
---------------------------------------------------------------------
Join the #solarphp IRC channel on freenode.org
---------------------------------------------------------------------


More information about the solar-talk mailing list