ASP.NET MVC Framework and Spring.NET

Great blog post here – this is but one of the parts of the MVC Framework I’m looking forward to!

public IController CreateController(RequestContext context, Type controllerType)
        {
            IResource input = new FileSystemResource(context.HttpContext.Request.MapPath("objects.xml"));
            IObjectFactory factory = new XmlObjectFactory(input);

            return (IController)factory.GetObject(controllerType.Name);
        }

This is quite impressive. This is very straightforward and simple to grasp. Later it shows here

protected void Application_Start(object sender, EventArgs e)
{
   ControllerBuilder.Current.SetDefaultControllerFactory(
                           typeof(MvcApplication.Models.Infrastructure.SpringControllerFactory));
   ...
}

how easy it is to setup your own controller factory.

The attention that MS is paying to allowing Spring.NET/Windsor, etc… to use MS MVC is music to my ears.

What I’m not looking forward to: convincing coworkers who only know Webforms what the value of all this is. Sometimes I feel like I’m the only guy on the island… 🙂

Advertisements

One thought on “ASP.NET MVC Framework and Spring.NET

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s