Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
We have a new project and we would like to utilize VS2012 with MVC 4.

Other projects will "join" this solution because those projects are similar and could re-use most of Controller layer logic, Model layer logic and View layer logic. There is ProjectID to distinguish between projects.

URL for each project should start with project name: http//:…./projectname1/{controller}/{action}/{projectid}
We would like to design solution as efficient/flexible as possible for above scenario in MVC.

1.Views layer: We are thinking to have one View for each page. Most of the page content should be the same from project to project. We think any project differences can be handled by using partial views (based on ProjectID).

2. Model Layer: structured similar to Views.

3. Controller Layer: we are thinking to have one controller per View with all actions related to that View. We think any project differences can be handled by using custom filters and child actions (based on ProjectID).

Does it sound as a reasonable approach when using MVC?

Are there any other patterns/best practices for using MVC?

Thank you
Posted
Updated 25-Oct-13 4:24am
v2

1 solution

Take all the aspects they will have in common, except boilerplate code like controllers, and move it to dlls and share them between your projects. You're asking for layers of complexity for no real benefit, as far as I can see, otherwise.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900