Areas in ASP.NET

I probably spoke or mentioned of this before, however I really started to use Phil Haacks ‘Controller Grouping’, aka ‘Areas’ sample code – and I really like the concept.

I’m using this currently to consolidate my library of html helpers, to build up samples of using mvc with jQuery, ExtJs, etc…

The beauty of this is how ‘pluggable’ areas are – each with their own set of unique files: controllers, views, models with a centralized way of accessing them.

As a former Monorails user, I find it extremely important and hope that this is actually built into mvc.

The scenario that areas address is being able to partition your application into discrete areas of functionality. It helps make managing a large application more manageable and allows for creating distinct applets that you can drop into an application.

From the blog you can download a sample prototype here.

I’m going to continue building up my ‘samples’ project with areas and see how it plays out, any gotcha’s on the way, etc…

I’d say that even if you don’t use the areas, building this in as a easy way to expand your solution is a great concept.

Great stuff!

(Here is another take on this approach by Steve Sanderson)


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s