tags:

views:

46

answers:

1

I am creating an application using asp.net MVC. By default, the model, view and controller are all in the same project, but can I create different projects or class library projects for the model, view and controller, so I could manage them separately? Is it recommended?

A: 

You definitely can. This part of the point of MVC to allow you to have such flexibility. As far as whether it is recommended, it depends on what you are doing. It is not necessity; however I think there are definitely many scenarios where it makes sense. Although, this probably makes the most sense for the model.

BobbyShaftoe
thanks, also i can have a different data access layer, right..?could u please brief me how this layers should talk to each other..?
Rahul Somwanshi
@Rahul Somwanshi: That's a different question, but in general, there's only one data access layer. The data access layer talks to the various parts of the data tier. Take a look at this blog post: http://www.simple-talk.com/dotnet/.net-framework/.net-application-architecture-the-data-access-layer/
Gilbert Le Blanc