I have a fairly large project at work that I have inherited. This is an ASP.NET 2005 website project and two C # library projects for accessing data and some business logic. The code actually runs 6 different database-based websites. It displays different images and text for each site based on logic that parses the URL and uses a series of Web.config values and switch statements.
We now have several new websites that will follow the same pattern and structure as these 6, and therefore the management decided that we should not reinvent the wheel, and we should continue to extend the existing code. Although I understand the solution from their point of view, the idea of extending this code with even more Web.config values and even more switch statements still seems wrong. There seems to be a better way to manage this particular form of complexity, but I have no way to deal with what the best way should be.
At the same time, I was looking for a project to start exploring ASP.NET MVC, and I tend to re-develop this project with it in due time, because it is complex, but the requirements are in the code. I am looking to get 3 things from moving it to MVC: 1) to be able to test the application and all its versions, and all its dark angles that I don’t even know about, there are still, 2) I hope to find a way to make the control about 12 sites on one managed code base; and 3) the study of MVC.
After a few, here are some specific questions:
Will MVC offer me the best ways to manage 12 sites in the same code issue? It’s a little difficult for me to tell without a deeper knowledge of MVC.
Is there a template template or framework that I can apply (in WebForms or MVC) that is suitable for sites that have similar content and structure and work with the same code base?
Is there a better way than to examine the URL to determine which site is being viewed, and which images and text should be displayed for each site?
Thanks for the time. I appreciate it!
source share