Reputation: 3074
I’m starting to learn MVC3 and I’d like to know if it is advisable to group your views and controllers in folders different to the default ones.
So I could organize the project such as:
-->ClientsFolder
-Views
----ClientsAdmin(Folder)
------View1
------View2
------View3
----ClientInvoices(Folder)
------View1
------View2
------View3
-Controllers
----ClientsAdminController(File)
----ClientsInvoiceController(File)
-->EmployeesFolder
Etc..
Etc..
I’d like to know, if it is a common practise, how should I start to adapt the project to this structure or if somebody could point me to a tutorial which could help me started.
Thanks
Upvotes: 0
Views: 656
Reputation: 3088
What you are describing is a feature MVC 3 already has (since MVC 2 I think). Areas.
Walkthrough: Organizing an Application using Areas
UPDATE: New working link.
Upvotes: 1
Reputation: 2688
What you are doing is fine. There's no need for a new area for every controller, areas should be for large chunks of application that aren't really the main application (like an administration site for your main site). This is an OK tutorial to get started MVC Movie Tutorial
Upvotes: 1