I have built and application in ASP.NET MVC, which started out orignally as a way to learn the technology. However, the application (and my knowledge of MVC) have progressed and I would like to use parts of the functionality I have created in other applications. Eg I would have 2 websites both wanting to use the same News Control (CRUD) model and controller methods, but with their own unique Views. I suppose my questions are: 1. Is this going against the principles of MVC? 2. What is the best way to achieve this? 3. Is there a "best practise" way to re-use my exisiting functionality?
Thanks in advance for any answers.
file upload working in one and not the other help
Can classic asp and ASP.NET MVC run side-by-side on the same site?
Setting a default value — presentation logic or business logic?
Suggestions/Recommendations for a Web Application with Sub-Apps
Dynamic content in static content
Id with / causes problems with routing [duplicate]
How to define route & controller structure for 2 controllers?
It's very common in production MVC sites to have a separate assembly (or assemblies) for the Model.
It's somewhat less common (but still done) to do the same for Controllers.
The S#harp architecture project (for example) uses a separate assembly for everything, leaving just views, content, and global.asax in the Web assembly.
It's all good.. Another thing you might consider is the use of Areas, which are like mini-MVC apps that you can reference in your 'main' app.
It's a great way to package reusable pieces like you describe.. Paul.