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.