views:

44

answers:

1

Well, Im a little worried about where to put the user controls and the forms (childs and parents), the helpers classes and so on. So Im using RepositoryPattern for DataAccess and my Forms was added in the ViewLayer with any organization. I want yours opinions about using some Architecture for deal with this, or just create some folders as the follow and take in consideration some app namespaces (example : CompanyName.View.Controls for UserControls components) :

ViewLayer : 
|
|-> Controls
|-> Dependencies 
|-> Diagram
|-> Forms
|-> Resources
+1  A: 

The folder organization doesn't really matters - the major goal is easy-to-find-my-class. With a modern tools like ReSharper you usually have powerfull GoToClass helpers, so if you name your class properly, you can easilly find it.

Howerer, its more important to separate your code to assemblies properly - to handle class visibility in a right way with public/internal visibility scope.

My small project usual solution template:

  • Acme.MyProject.Components.csproj
    • DAO
    • Models
    • Controllers
    • Exceptions
    • Services
    • Utils
  • Acme.MyProject.Tests.csproj (depends on Components)
    • DAO
    • Models
    • Controllers
    • Services
    • Utils
  • Acme.MyProject.Site (aspnet web sie, depends on Components)
    • App_Code
    • Controls
    • Layout

When using WCF, I also create a small assembly .Entities, where I store all Data- and Operation contracts, to easilly reuse one in WCF clients

Yury Skaletskiy
Why have more than one folder DAO with the same name on diferent layer? I won't think is part of the pattern
Angel Escobedo