开发者

how do you organize your model code in asp.net-mvc?

it seems like in my model folder, all of my classes fits into one of 3 buckets:

  1. Pure POCO data objects / business Objects
  2. Repository implementation code to query data开发者_开发百科bases and external services
  3. Helper code.

Is this normal and is there a best practices on how to organize this. should i have subfolders for 1, 2 + 3? any recommendations?


If you look at http://www.sharparchitecture.net which tries to provide a best practices framework, you'll see that POCO/entities, repositories and helper code are not only separated, they also exist in different assemblies. This is so that it's physically impossible to leak from one container to another. This framework grew from http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx article which is also good to read.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜