Pretty deep into my MVC review, and although an MVC will result in a bit more complexity to the overall app design, it really seems to be the way to go with where the .Net framework is headed, especially with the Entity Framework (EF) stuff. I even got a virtual machine going with MVC 2.0 and VS 2010 beta, but after working with it a little while, it's still a little buggy so backed it down to VS 2008 and MVC 1.0 for now. Was wanting to take advantage of the newer EF 4.0 changes, but as long as I implement interfaces and concrete classes, I should be able to move to that pretty easily.
I am now review your DirectController, very cool stuff. I have two quick questions:
1 - Why is there the need to manipulate the Request variable for the incoming path for the router? In other words, why the need for the following code in the Default.aspx page:
2 - In my ExtJS 2.2 application, I frequently had the need to returned multiple JSON data objects when dealing with forms that contained combo boxes that first needed to be populated with their potential value list, then have their value set with to the proper value from the main data object. How are you handling this in the MVC world? Or is this more of a question of using Direct batching rather than MVC? I kind of like making one call for a form and getting back all necessary sets of data to populate both the combos and the form data, so to me it's more of an MVC how-to question.
// Change the current path so that the Routing handler can correctly interpret
// the request, then restore the original path so that the OutputCache module
// can correctly process the response (if caching is enabled).
string originalPath = Request.Path;
IHttpHandler httpHandler = new MvcHttpHandler();
Thanks for your help!