Question

I am new to ASP.NET MVC4.

I must build a number of utilities (~40-50) that are going to be used by 4 groups of users in our internal windows domain.

I have made a controller named SupportController and i plan to include in there the 40 actions i want.

Some of them are special to each group and some are common.

I want to create a frontpage by accessing HomeController -> Index action. This frontpage will include a global menu.

I want to have urls like:

www.mydomain.com/bg/nullfix
www.mydomain.com/bg/invoicecorrection
www.mydomain.com/ro/updatecurrency
www.mydomain.com/ro/deletecosting
www.mydomain.com/common/fixaddressbook

e.t.c

From what i have read i do this url structure by altering the route configuration, For example (covers the above example #1 url):

routes.MapRoute(
                name: "BgNullifiedInvoice",
                url: "bg/nullfix",
                defaults: new { controller = "Support", action = "BgNullifiedInvoicesFix"}
                );

Since this will be my entry level mvc project, it will grow over time...

So is it proper to get into using the Areas functionality of ASP.NET MVC or get by using just routing?

Was it helpful?

Solution

Personally I would suggest using areas in such a project. They exist to separate your software's functionality into modular, organised and easily maintainable groups each with their own set of routes - which is exactly what it sounds like you need.

One thing that's certain about software is change, and areas help ease that change.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top