In questi giorni, ho utilizzato la seguente struttura e finora ha funzionato molto bene:
Mostra un sistema client / server fittizio con 3 funzioni o moduli di applicazione chiamati Foo, Bar e Baz. Gli utenti possono accedere al sistema tramite una riga di comando, un'interfaccia utente o un'interfaccia basata sul Web.
Questo tipo di struttura è molto TDD e DI friendly nella mia esperienza.
Features
Assembly: Contoso.Features.FooFeature
Folder: Contracts contains interfaces unique to "FooFeature"; is available at both client and server ends
Folder: Models contains models unique to "FooFeature"; is available at both client and server ends
Folder: Services contains services unique to "FooFeature"; is available at both client and server ends
References:
* Contoso
Assembly: Contoso.Features.FooFeature.Services contains services unique to "FooFeature"; is available only at server end
References:
* Contoso
* Contoso.Features.FooFeature
Assembly: Contoso.Features.FooFeature.Tests
Folder: Models contains tests for models unique to "FooFeature"
Folder: Services contains tests for services unique to "FooFeature"
References:
* Contoso
* Contoso.Features.FooFeature
* Contoso.Features.FooFeature.Services
Assembly: Contoso.Features.BarFeature
Folder: Contracts contains interfaces unique to "BarFeature"; is available at both client and server ends
Folder: Models contains models unique to "BarFeature"; is available at both client and server ends
Folder: Services contains services unique to "BarFeature"; is available at both client and server ends
References:
* Contoso
Assembly: Contoso.Features.BarFeature.Services contains services unique to "BarFeature"; is available only at server end
References:
* Contoso
* Contoso.Features.BarFeature
Assembly: Contoso.Features.BarFeature.Tests
Folder: Models contains tests for models unique to "BarFeature"
Folder: Services contains tests for services unique to "BarFeature"
References:
* Contoso
* Contoso.Features.BarFeature
* Contoso.Features.BarFeature.Services
Assembly: Contoso.Features.BazFeature
Folder: Contracts contains interfaces unique to "BazFeature"; is available at both client and server ends
Folder: Models contains models unique to "BazFeature"; is available at both client and server ends
Folder: Services contains services unique to "BazFeature"; is available at both client and server ends
References:
* Contoso
Assembly: Contoso.Features.BazFeature.Services contains services unique to "BazFeature"; is available only at server end
References:
* Contoso
* Contoso.Features.BazFeature
Assembly: Contoso.Features.BazFeature.Tests
Folder: Models contains tests for models unique to "BazFeature"
Folder: Services contains tests for services unique to "BazFeature"
References:
* Contoso
* Contoso.Features.BazFeature
* Contoso.Features.BazFeature.Services
Apps
Clients
Assembly: Contoso.CmdApp is the command line application client
References:
* Contoso
* Contoso.Features.FooFeature
* Contoso.Features.BarFeature
* Contoso.Features.BazFeature
Assembly: Contoso.WinApp is the Windows application client
References:
* Contoso
* Contoso.Features.FooFeature
* Contoso.Features.BarFeature
* Contoso.Features.BazFeature
Assembly: Contoso.WebApp is the Web application client
References:
* Contoso
* Contoso.Features.FooFeature
* Contoso.Features.BarFeature
* Contoso.Features.BazFeature
Servers
Assembly: Contoso.WebSvcApp is the Web application server; exposes services via REST or WCF, etc.
References:
* Contoso
* Contoso.Features.FooFeature
* Contoso.Features.FooFeature.Services
* Contoso.Features.BarFeature
* Contoso.Features.BarFeature.Services
* Contoso.Features.BazFeature
* Contoso.Features.BazFeature.Services
Core
Assembly: Contoso
Folder: Contracts contains interfaces common to the entire system
Folder: Models contains models common to the entire system
Folder: Services contains services common to the entire system
References:
* None
Assembly: Contoso.Tests
Folder: Models contains tests for models common to the entire system
Folder: Services contains tests for services common to the entire system
References:
* Contoso