What are the best practices for setting up projects with multiple interfaces in asp.net MVC2? I'm starting a project where we need a typical arrangement like:
example.com/ - end-user interface
example.com/Admin/ - site management
The site will be involved enough that simply having all the user logic in HomeController and all the admin logic in AdminController isn't really an option. I've read about using multiple Route definitions, but the following doesn't seem to work properly:
routes.MapRoute(
"Admin", // Route name
"Admin/{controller}/{action}/{id}", // URL with parameters
new { controller = "Admin", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
It causes all the links on the homepage to point to example.com/Admin/local-part instead of example.com/local-part.
I'd like to avoid specifying a different MapRoute for each Admin controller (omitting {controller} from the mapping each time).
I've also read about setting up different Areas within a project, but that seems like it would be too involved for the scope of this project.
Finally, I've also read that you can put constraints on MapRoutes, but the documentation on that part seems confusing to me. Is there something obvious I'm missing? Failing that, are there any best practices for asp.net structure that I should keep in mind?