feyd or arborint

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

feyd or arborint

Post by alex.barylski »

feyd, because is the master of searching and finding topics on these forums...and because you simply have the most exposure to the content on these forums. :)

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? :)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

"or Jcart"

I believe this is what you are looking for is http://ap3.sourceforge.net/
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Hmmm....I guess thats what I was asking for, but it's not what I was expecting...

I really just want to see a minimal single class front controller implementation, to compare to my own...Zend (while flexible) is way over kill for my own needs. I enjoy some abstraction, but I find Zend is a little to zealous.

Off the top of my head, here is the API of my current:

Code: Select all

class Front{
  setControllerPath($path);
  setControllerArgs($name, $object);

  startMain($ctrl, $action);

  _loadController();
  _execAction();
}
I don't need any router/mapper abstractions, I can handle those directly via startMain() if needed...so I'm sure you can see where i'm going with this...KISS...literally... :D

Comments, suggestions, feedback?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

(#10850)
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

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?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Not a 'who would win in a fight' thread then?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Hmmmmm...good question :)

Best to ask Google:

http://www.googlefight.com/index.php?la ... 2=arborint
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

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?
I think a dispatcher is more of an addon to the front controller as it is not neccesary, although definantly a plus.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

If I understand the purpose behind a disptacher, then under *most* circomstances it would be require... :?

Do you mind me asking for your own definition or interpretation of a dispatcher in a front controller?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Do you mind me asking for your own definition or interpretation of a dispatcher in a front controller?
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).
Post Reply