asp.net mvc - placment of classes in NerdDinner -
i learning asp.net mvc , looking @ asp.net mvc sample application nerddinner.
the folder "models" contains class called
dinner.cs
. main dinner entity. shouldn't class in other location? example "domain" ? , instead should viewmodel class put in models folder contains dinner information?why file "paginatedlist.cs" located in folder called: "helpers". shouldn't file in folder: "models" since supplied views?
any clearification on realy appreciated!
sure, thinking right this. nerddinner made concept-presentation purposes , doesn't pretends best practices. becomes more , more obvious own project grows. have domain entities/services/repositories in separate folder, separate project, possibly separate solution. find renamed folder
viewmodels
make more obvious other people working on project.paginatedlist can viewmodel , contain data related pagination. can put
viewmodels
folder. believe have in nerddinner - simple view helper generate pagination markup. moreover, helpers not strict "view" or "viewmodel" - can contain simple logic, they're in middle :) between view , viewmodel. note paginatedlist more of "framework" concern of "particular solution". can't place "views" or "models" folder amongst project-specific things. "helpers" enough nerddinner. in real solution you'd better make common, include "framework" on top of mvc.
Comments
Post a Comment