I've joined a new team who are maintaining and updating a large enterprise MVC 5 application with razor views. On top of the main web, we have a bout 20 different areas with a shared layout 5. We're also using AngularJS, TypeScript, Jquery and many other js libraries that most areas require.
- Main Web
- Area 1 (Models, View, Controller etc) (MvcBuildViews = false)
- Area 2 (Models, View, Controller etc) (MvcBuildViews = true)
- Area 3 (Models, View, Controller etc) (MvcBuildViews = false)
- ... etc
(Note that MvcBuildViews is true for some of the areas, but not all)
We've noticed an extremely slow build time, around 5 minutes or more, and while the code base is simply massive, the vs build log seems to indicate that the build process spends a simply ungodly amount of time moving script and views files from the areas for compilation.It seems like our many areas are slowing down the build time considerably.
I've also noticed that in difference to other MVC 5 projects I've worked with, it's impossible to make changes to the view razor files while running the application without rebuilding the entire project.
The team says that they have no need to be able to patch each Area in production, nor do they feel they need the separation required.
My question is this: Is it reasonable to assume that we can lower build time significantly by removing the areas and migrating the controllers and views to the main web? In doing so, we will keep the controllers as light as possible, and move most of the logic to specific project repositories (so area CustomerWeb.Reports.Area becomes CustomerWeb.Reports.Repo and has it's controllers and views relocated to main web).
I understand my question isn't very specific, but I haven't been able to find much info concerning build time and areas in my own research. I am under the impression that the consensus is that areas is an outdated pattern with more cons than pros, but I haven't been able to find any info to confirm this either.
Thanks in advance!