Programmer epiphany
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
As I understand it, you are correct in that index.php is implemented as a single entry application, acts primarily as a front controller and delegates actions to appropriate view/controllers
Whereas index2.php does not need a front controller as events are routed automatically by clicking on links...
Knowing this, do you have any opinions on either design that you would like to share?\
Obviously there are some differences which have implications...
I've stumbled across a few, but other than the obvious, can you think of anything of interest which I might want to consider???
If not that's cool...just listening to me babble is letting me basically note take on my own ideas and helps powering my think cycle
Whereas index2.php does not need a front controller as events are routed automatically by clicking on links...
Knowing this, do you have any opinions on either design that you would like to share?\
Obviously there are some differences which have implications...
I've stumbled across a few, but other than the obvious, can you think of anything of interest which I might want to consider???
If not that's cool...just listening to me babble is letting me basically note take on my own ideas and helps powering my think cycle
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
For me it is usually about reducing dependencies to those that are necessary. With a Page Controller you can achieve the same thing as with a Front Controller (knuckleheads like Tony Marston regularly rant). But with a page controller the Action has dependencies on the common code. With a Front Controller the Actions know very little to nothing about the common code. This is a negative for the Front Controller for many programmers because it makes some changes more difficult. But I find that it forces me to be more thoughtful when adding functionality to the global/service code which I have proved to myself reduces errors and cruft. A system with fewer dependencies needs fewer test.
(#10850)