Hor the last couple of weeks, my colleague and are in a discussion about framework's url routing. What do you think, which is better way to do the job. Dynamicaly checking route for for existing module/controller/action with no predefined routes or "hardcoded" route setting like it's done in zend framework.
I know that both ways have their pros and cons, but i want to know other side. Other opinion.
I noticed that every known framework uses the second, defined url route way. Where you directlly specify all application's routes.
<?php
$route = new Route('route_name', '/url/route/:some_variable', array('controller' => 'url', 'action' => 'route'));