asp.net mvc - placment of classes in NerdDinner -


i learning asp.net mvc , looking @ asp.net mvc sample application nerddinner.

  1. 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?

  2. why file "paginatedlist.cs" located in folder called: "helpers". shouldn't file in folder: "models" since supplied views?

any clearification on realy appreciated!

  1. 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.

  2. 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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -