Quantcast
Channel: Comments on: An Introduction to the Front Controller Pattern, Part 2
Browsing index pages (24 articles)

By: Martin Psinas

I just can’t seem to wrap my head around this… Part 1 makes perfect sense to me; you have a default index controller, you’re detecting the URL path and routing to controllers dynamically, everything...

View Article


By: Daniel Long

Hey there — excellent article. I was wondering if you may have any resources you recommend on the request / route / dispatch / response cycle as it pertains to web development. thanks, daniel

View Article


By: Alex Gervasio

Hey Mel, Glad to know the articles have been instructive. Your idea on a front controller is spot on. A front controller isn’t what we commonly know as page or “action” controllers” in some frameworks....

View Article

By: Mel

great articles! It is learned me a lot in a simple manner. I want to use this approach in one of my project, but if I want CRUD functionality in my Controller, do I have to create a EditController, a...

View Article

By: Alex Gervasio

Keep in mind that index.php is just a centralized point where your front controller resides. Based on that schema, you’re free to use it for routing/dispatching requests to the appropriate action...

View Article


By: Kevin

I completely agree with you on MVC approach. #2: suppose i want to build an app that needs to display pages but some URIs will process ajax data. Would i need to add all possibilities to the index.php?...

View Article

By: Alex Gervasio

Glad to hear that. Now, about your questions: 1) “If I set up multiple controllers to handle different tasks, do I now need to specify them in the index.php using: $request = new Request( … );...

View Article

By: Kevin

Got it working. Whew! Thanks for your help Alex. If I set up multiple controllers to handle different tasks, do I now need to specify them in the index.php using: $request = new Request( … ); $response...

View Article


By: Alex Gervasio

You need to include the autoloader in your index.php file before registering it in the SPL stack. Again, make sure to copy the code exactly as appears in the article’s last code sample. Just do so and...

View Article


By: Kevin

I get this error when i turn on error handling: Fatal error: Class ‘Acme\Library\Loader\Autoloader’ not found in (path) So I try adding this line to index.php: use...

View Article

By: Alex Gervasio

Hey Kev, Just to make things a little bit clear, you only need one .htaccess file to get the whole request/route/dispatch/response cycle up and running. From that point onward, if you pass along to the...

View Article

By: Kevin

if i go to /test what should i see?

View Article

By: Kevin

Using PHP 5.3.8

View Article


By: Kevin

Are other .htaccess files required in the other directories? Or just one in the root? I ask since CakePHP has 3, one each at different folders.

View Article

By: Alex Gervasio

Hey Stefan, Glad to know the post has been instructive. Unfortunately, in this case I can’t please you and provide you with a straight download of the source files, cause I conceived the article pretty...

View Article


By: Stefan

Hi, this is a great article. Very helpful to me. Do you also provide the script for download?

View Article

By: Alex Gervasio

Actually, I’m not saying that you can’t build a HMVC stack at all. Just I don’t like to deal with chained controllers, MVC triads and the related stuff. In either case, if you’re interested in tweaking...

View Article


By: Marten

How would you build something like a ‘HMVC’ then?

View Article

By: Alex Gervasio

Thanks Marten for the positive comments. Yes, you’re correct regarding the front controller’s modularity would allow you to get a nice HMVC implementation up and running with minor hassles. I’m not a...

View Article

By: Marten

One advantage of the ‘second’ implementation of the Front controller is that you easily can use it like a HMVC framework. :) nice article!

View Article
Browsing index pages (24 articles)


Latest Images