I am rewriting some old ASP applications that were not well structured and trying to learn .NET and MVC3 in the process. There are two main applications, one of which reuses code from the other and is really just a very limited version of the other one. One provided "power" users with reports on any person in the database. The other one provided a report only on the individual requesting the report. These are on separate servers, the more limited one in a DMZ and the more powerful one behind a second firewall.
My question is, since the actual report is the same for both, just parameterized for the more powerful one to allow it to be run on any user, I do NOT want to copy-and-paste reuse the report generation from one side to the other. I would like to make some kind of reusable library of the controller and views/partials that would provide the same information, and allow me to maintain it all in one place.
Is this possible with MVC3? Or is there a better approach? I searched here a bit but didn't find anything on this, but maybe I just didn't use the right terms.
I'm on VS2010, C#, MVC3 with Razor.
Thanks in advance.
MVC Contrib project has portable areas.
http://mvccontrib.codeplex.com/documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With