MvcContrib latest release now with SubController support

One of the items that many people I know have requested are subcontrollers.  Most non-trivial web applications require many things happening on a single screen.  Even if it’s only the current shopping cart displayed on multiple screens, the MVC Framework needs a mechanism of screen decomposition so that web applications can scale with complexity.  WebForms has the Control model where markup and logic live together and can be composed easily. 

With the MVC Framework CTP 5, a single action method has to make decisions for the entire screen.  There are ActionFilters that can do some logic, but those are attributes, and attributes are not conducive to logic decomposition.  Furthermore, ActionFilters do not work with partial views.

RenderPartial also doesn’t do the job because the main view still has to know the partials.

If you haven’t looked at MvcContrib’s SubController support, have a look at the latest release and check out the samples.  The samples show many uses for SubControllers for GETs, POSTs, and unlimited nesting of SubControllers.  Each SubController has its own view, and it uses Action methods with all the same built-in dynamicism as regular controllers.  In Fact, SubController inherits from Controller, so a SubController IS a  Controller. 

We (Headspring) are using MvcContrib SubControllers in real projects, and they are paying strong dividends.

I’m still hoping SubControllers will make it into the ASP.NET MVC Framework, but if they don’t, I’m happy using this implementation.

You can follow MvcContrib on twitter.  See what Matt Hinze has said about his experience with SubControllers.