views:

339

answers:

3

I've built ASP.NET webform projects in the past, and when generating Subsonic classes, the teams I have been on have put our Business Layer/DAL objects into a Project.Framework project.

Would that still be a recommended structure, or should the Subsonic classes go directly into the /Model folder within the MVC web project?

A: 

I would not put the Subsonic classes directly in the MVC project. Since you didn't with ASP.NET, there is no reason to change now.

I wouldn't even leave the Controllers in the MVC web project.

BlackMael
A: 

You can put them in Model, and move them to their own project later, but its not really any more work to just put them in their own project now, so I would just do that.

John Sheehan
+4  A: 

It shouldn't go in the Model folder (I think the Model folder should just be used for a Class that is made only for the view and wont be used in the rest of the app).

It should go into a separate assembly Maybe Project.Core or Project.Data

Yitzchok
So what is the relationship between the classes in the model folder and the Subsonic objects in the other project? Is the model just a wrapper for the Subsonic object?
y0mbo
If you choose to use the model as a ViewModel, the model object is designed to match your view perfectly, with any data the view will ever need. However, a ViewModel designed this way is a poor domain model. Let your Controller talk to a ViewModel, the ViewModel to DomainModel (a SubSonic class)
Thomas Eyde