tags:

views:

56

answers:

2

I'm looking to migrate web forms app to mvc. One of the organizational issues I would need to tackle is our folder structure. Currenly it's organized by functional area e.g.

  • Application
    • Functional Area (e.g. MyAccount)
      • Task 1 (Manage Notifications)
      • Task 2 (Change Payment Info)
      • etc..
    • Functional Area
      • Task 1
      • Task 2
      • etc..

which works quite nicely for our task-based app. However, from my understanding, the default organization with an MVC app is similiar to

  • Controllers
    • Task1Controller.cs
    • Task2Controller.cs
  • Views
    • Task 1
      • ViewOne.aspx
      • ViewTwo.aspx
    • Task 2
      • ViewOne.aspx
  • Models

etc.....

I would like to retain the layout we currently have. I'm envisioning a structure more like

  • Application
    • Functional Area (My Account)
      • Task 1
        • Controller
        • View 1
        • View 2
      • Task 2
        • Controller
        • View 1
        • View 2

etc...

Which roads do I need to head down to achieve this? And if I did, what kind of pain would I suffer from deviating quite drastically from the convention?

+1  A: 

Have a look at areas in ASP.NET MVC 2.0.

Robert Harvey
+4  A: 

This is something that's available in version 2.0 of ASP.NET MVC.

They're calling it Areas

Some more info from Phil Haack.

Here's what Steve Sanderson has said.

These areas are designed to allow you to seperate out your models, views and controllers into logical "areas".

  • Area1
    • Model
    • View
    • Controller
  • Area2
    • Model
    • View
    • Controller
Jamie Dixon