This component of the framework has been rewritten from scratch and it's really powerful and flexible, allowing you to create a lot of combination of routes. The main functionality of the router is matching a request to a given controller/action. It also assembles URLs based on the defined routes. This process is accomplished by inspecting the URI and attempting to match it with a given route that has some constraints, or by generating the URL based on the parameters defined on the routes.
The general flow of this component is as follows:
A request arrives and the framework creates a request object
Then the route parses the URI to identify the segments
After that the router iterates through the list of routes previously ordered
On each iteration, the segments of the URI are checked to see if it matches the current route
When a route matches the URI, the request is dispatched to the specific controller and action is configured on the route
We have two parts on the routing system: the...