views:

132

answers:

4

In MVC 2 we can create areas easily. Now my question is related to nested areas (areas inside of areas).

Select my "father" area folder, Right-mouse-click > Add > NO option for a new Area.

Is it possible to do it in some other way ? or will this option be available in the near future?

+2  A: 

You do not want to have nested aereas. There is something wrong in your Software design.

the most common case is, that you use areas as Html Renderer, therefore are the Display Templates.

cRichter
No, that is not the reason, neither a problem with the design :) the idea of nested areas would be to have all the the pros from the "Areas" and extend them into a "tree type organization" as well - organization and separation of concepts into nested areas. That would be really cool. Just like some part of the "nested master-pages" concept.
emanyalpsid
An Master page is only the "View" part. that means, nesting them allows the view to have a hierarchy.An Area has controller, Model, and View inside it. but okay, lets get deeper. how would you like to derive from the nested Area. in the controller? in the View call the other controller? maybe there is a design, that i just cant figure out...
cRichter
An Area allows a different organization, not only because it has a different namespace, but also because it has his own directory structure of controllers, views, models. And I see a lot of advantages in this.
emanyalpsid
Yes, i completely agree on that. we encourage to use areas. but what is the reason to have them nested?
cRichter
A: 

Maybe something like this could help. It's more like a study which is in mvc-contrib. I saw it for version 1 don't know if it's compatible for MVC2 It's the concept of sub-controllers: http://mhinze.com/subcontrollers-in-aspnet-mvc/

server info
+1  A: 

Using the idea of Multi-project areas as a start, I guess you could recursively create more nested areas.

Ahmad
+1  A: 

For now there isn't any information telling if there will be nested areas.

In the future maybe this will change.

emanyalpsid