Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 31, 2008 01:58 PM by RobSil
Dec 31, 2008 01:14 PM|LINK
I am re-starting a website in ASP.NET MVC and want to make sure I follow proper practices. To date, I've come across only one article that talks about the model in any great detail...(http://quickstarts.asp.net/previews/mvc/mvc_UnderstandingModel.htm).
My question is, would all of my business logic go into the model folder? To me, the model means more the classes that represent the data, not the additional classes for extracting the data, utility classes etc. Generally is the Model folder intended to
replace the App_Code folder? That article in the above link, I interpret as meaning it does. In my project, in general terms I plan to have...
- extension classes for most classes
- DB classes/namespaces of Handler/DAO/DB format. I am using the Telerik ORM tool so I would assume these classes would go there also.
- Business Logic classes
So I guess all of these go into namespaces in the model folder?
Dec 31, 2008 01:45 PM|LINK
If your model has ant serious amount of Business Login or DB access it is best practice to seperate thos into projects and call these Dlls from you controllers.
The Model folder is good for simple models but more complex systems shouldnt really use it at all.
Take a look at some of the MVC sample apps on the web for a better picture.
Dec 31, 2008 01:58 PM|LINK
Thanks for that pointer... I downloaded MVC storefront and will base my design on that... it's an excellent structure!