Reverse routing

Reverse routing is a feature in Pippo that is used to allow you to easily change your URL structure without having to modify all your code.
Why would you want to build URLs instead of hard-coding them into your templates?
One answer is that reversing is often more descriptive than hard-coding the URLs. More importantly, it allows you to change URLs in one go, without having to remember to change URLs all over the place.

If you create a route like (the Controller aproach):

GET("/contacts/{id}",ContactsController.class,"show");

This route will take requests such as /contacts/1 and map it to the show method on the Contacts controller.

Using reverse routing we can create a link to it and pass in any parameters that we have defined. Extra parameters suplied in method Router.uriFor are added as query parameters in the generated link.
Also this method is available as a shortcut in RouteContext.