Jonathan Escobedo
Jonathan Escobedo

Reputation: 4063

Organization of folders on VS Solution

Well, I'm a little worried about where to put the user controls and the forms (children 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

Upvotes: 0

Views: 136

Answers (1)

Yury Skaletskiy
Yury Skaletskiy

Reputation: 4239

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

Upvotes: 1

Related Questions