arborint, because if memeory serves, you were the author...
I can't for hell or high water find the basic trivial implementation of a front controller arborint demonstrated a while back
Can someone find that for me?
Moderator: General Moderators
Code: Select all
class Front{
setControllerPath($path);
setControllerArgs($name, $object);
startMain($ctrl, $action);
_loadController();
_execAction();
}I think a dispatcher is more of an addon to the front controller as it is not neccesary, although definantly a plus.Hockey wrote:Cool, thanks man
My API is slightly more verbose, but it seems we basically share a common idea of what a simplisitic (not overly abstracted) front controller would do.
One question though, a quick glance at your code but it appears you are missing a critical component for a powerful front controller, that is of any kind of dispatch mechanism???
As I understand it, Zend implements something of a message queue (analogous to Windows message queue) as well as a message pump (for or while loop) which repeats until there are no more controller:action pairs to be handled???
Without me requiring to further look at Zend source, is this not an integral part of the front controller or is it implemented as a abstraction or plugin to the system itself? Personally I see it making more sense as a core element of the front controller...
Thoughts?
Basically it handles the calling of controllers. You could implement in the Front Controller itself but since the FC is by and large a simple animal the complexity of calling controllers/actions as well as handling dispatch staging (e.g. plugin integration) is better left in a separate class. In a simple implementation you would avoid Routing logic as much as possible so the dispatcher requires no routing classes (which is largely where the ZF complexity is sourced by the way since the rest is pretty standard).Do you mind me asking for your own definition or interpretation of a dispatcher in a front controller?