What's In This Chapter?
When it comes to source code, software developers are notorious for fixating on little details to the point of obsessive compulsion. We'll fight fierce battles over code indentation styles and the placement of curly braces. In person, such arguments threaten to degenerate into all-out slap fights.
So, it comes as a bit of a surprise when you approach a majority of sites built using ASP.NET and encounter a URL that looks like this: http://example.com/albums/list.aspx?catid=17313&genreid=33723&page=3.
For all the attention we pay to code, why not pay the same amount of attention to the URL? It might not seem important, but the URL is a legitimate and widely used user interface for the Web.
This chapter helps you map logical URLs to action methods on controllers. It also covers the ASP.NET Routing feature, which is a separate API that the ASP.NET MVC framework makes heavy use of to map URLs to method calls. The chapter covers both traditional routing as well as the new attribute routing introduced in ASP.NET MVC 5. The chapter first covers how MVC uses Routing and then takes a peek under the hood at Routing as a standalone feature.
Usability expert Jakob Nielsen (www.useit.com) urges developers to pay attention to URLs ...