Will you put the model part in asp.net mvc into a different library/assembly?
Edit
Or should we put put the model part in asp.net mvc into a different library/assembly?
Will you put the model part in asp.net mvc into a different library/assembly?
Edit
Or should we put put the model part in asp.net mvc into a different library/assembly?
A related question can be found here: Best place to place Domain objects in an ASP.NET MVC App?
I have got my domain models in separate assemblies. The models folder in the MVC project contains only view models.
My personal opinion is that the answer would be yes - different assembly. I would go with both a separate project, separate namespace, and a separate assembly. However, I decided to consult several of the readily available ASP.NET MVC reference apps to see how they did it. The results:
Looks like the split is about 50% / 50%. Oxite is the only application meant to be redistributed and run so I'm partial to its structure. However, my absolute preference is to structure things similar to the way that the Mvc Store Front is structured.
I put the domain models in a different assembly and namespace.
I don't always stick with one application type and having my domain models in a separate assembly makes reuse much easier. While I may see the primary use as a web-based MVC application I may find that I need a desktop version or a iPhone or Windows Mobile application that uses the same domain models so it makes sense to have them separated.
I will however typically still have models in the MVC applications. I tend to use one class for each View and I keep those models in the MVC app itself.