Jump to content

PHP dispatchers


RhoVisions

Recommended Posts

I've recently started learning about PHP frameworks, namely CakePHP at this time (if someone thinks that's not a good place to start, please do tell). I've noticed many frameworks work by using dispatchers to analyze URLs to figure out what action to take.

 

So far, all I can figure is that when a URL is typed in, a .htaccess points what would be a 404 error to a dispatcher, which goes through the URL to figure out if the URL is a valid request, at which point it would execute, or to determine it really is a 404 and to show that.

 

Do I have a handle on what a dispatcher does? Or is it more basic? Or perhaps more complex? I'm hoping to find out, to get a better understanding of whats really going on.

Link to comment
https://forums.phpfreaks.com/topic/131752-php-dispatchers/
Share on other sites

Not all frameworks use dispatchers. Cake is a big, fat ugly pig. But that's an argument for another forum :P

 

You've got the basics though - in a very generalized way, a dispatcher is nothing more than a middle manager. It figures out the needs of each requests and directs it to the appropriate controller.

Link to comment
https://forums.phpfreaks.com/topic/131752-php-dispatchers/#findComment-684388
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.