Just read a post about MVC best practices. Couple parts of the post described building helper methods to link to actions on the controllers. Here's a clip:
1) Create Extension methods of UrlHelper to generate your url from Route
Avoid passing the controller, action or route name as string, create extension methods of UrlHelper which encapsulates it, for example:
public static class UrlHelperExtension { public static string Home(this UrlHelper helper) { return helper.Content("~/"); } public static string SignUp(this UrlHelper helper) { return helper.RouteUrl("Signup"); } }
I can see how this would shorten links used in views... but I don't see how this is a "best practice". Perhaps I'm simply overlooking something. Should I be doing this to build my links? Are there benefits to this I'm just not seeing?
He even goes on to say that stylesheets, images, and javascript helpers should be made...