tags:

views:

98

answers:

1

On a regular winforms solutions, how do you determine to break classes into different directories / namespaces or seperate projects. Besides binary dependencies should view, controllers, models all be in different projects ?

+2  A: 

I tend to believe that you can happily work with a simpler system and separate your dependencies using folders. Adding extra projects makes the system slightly harder to work with, deploy and maintain as you now have several smaller things you have to coordinate.

Using folders you will still have to ensure that hasty developers do not bypass your layering, which can be a big concern with junior developers. You can watch out for violations using static checking (like NDepend) but no checker is perfect. If you have specific functionality at each level that you feel you need another protection level (internal) then by all means split it up into separate projects.

As for what folders to break them into I would likely follow the conventions found in web mvp/mvc frameworks such as.

Controllers\
Views\
  Broken down by controller
Model\

You might want to read this blog post on the topic. Good luck.

smaclell