Add Portable Areas a la Orchard CMS Modules
It would be an incredibly powerful feature if ASP.NET MVC would support Portable Areas out of the box. A PA would be a class library which contains its own controllers, models, content, views etc. Resources such as css, scripts, images and view templates (.cshtml, .aspx etc) could be embedded resources, but we should also have the option to simply drop the entire project in some sort of "modules" folder in the main MVC application (just like Orchard CMS supports). The main MVC application will autmatically register the areas found in the "modules" folder (also as in Orchard CMS)
This is planned for a future version of ASP.NET MVC.
is this adding adding more runtime capabilities to the areas/ register areas feature? I implemented this in mvccontrib and that code is now part of the .net foundation, so you can look at that for some ideas, but the problem we were trying to solve was really a pre nuget problem, if what you planned was to unpackage a nuget at runtime and lay it down and register it, that may make sense, but the embedded portion of this ask is outdated.
So anything more than just planned? Roadmap timeline? maybe MVC 5.*? or MVC 6 or 7?
Jonas Gauffin commented
I've described how you can achieve that here: http://blog.gauffin.org/2012/05/griffin-mvccontrib-the-plugin-system/
But it would be better if the support was built in, since Razor gives a lot of warnings for some class libraries (it seems like it tries to compile the views as .NET 2)
This pattern is a keystone for multi-tenant applications. It would be helpful to have some official code or P&P guidance on this!
Graeme Miller commented
This the top feature that I would want in MVC. Managing large scale projects made up of re-usable modules requires this feature.
Alexey Tarasov commented
Areas should also be able to register all their types in a Dependency Injection Container Builder by themselves.
It would be very nice to be able to specify area's url prefix in the application start for each area.
Emmanuel Morales commented
This feature should facilitate the sharing of application components/widgets.
This is a crucial feature for large scale web application.
We are currently shipping multiple products each has its own web based configuration pages and they also access a shared web based-portal for authentication + aggregated xml sitemap. We have been thinking to switch to mvc but lack of portable areas feature stopped us :( please have this feature in 4.0
Thomas Bratt commented
Would be great to avoid having scripts, etc as embedded resources so that we don't have to recompile everytime.
Areas that could be reused across projects would be great, without incurring the overhead of rebuilding a component every time a small change is required.
terrance smith commented
Portable Areas can be added via MVC Contrib so that but adding a module easily from a CMS or a blog. Why isn't this higher? lol