The routing system does two things: It recognizes URLs and it generates URLs.
Recognizing URLs is useful because it’s how your application decides what it’s supposed to do when a particular request comes in:
http://localhost:3000/recipes_for/apples What do we do now?!
Generating URLs is useful because it allows you to use relatively high-level syntax in your view templates and controllers when you need to insert a URL—so you don’t have to do this:
<a href="http://localhost:3000/recipes_for/apples">Apple recipes</a> Not much fun having to type this out by hand! ...