Strategy Guidelines for Assemblies and Namespaces

A very difficult task for technical architects is to split the application into assemblies and namespaces.

  • Assemblies can be partitioned: deployment boundaries, performance, and security.
  • Namespaces can be split across the logical boundaries of an application.

Also: namespaces can span multiple assemblies.

I had bad experience in the project when we divided assemblies into logical units of the application. This solution ended up with decision files with 30 or 40 projects! Download time for the main solution file was approx. 5 minutes!!! It ended in a big waste of time, pff ...

The opposite scenario was to keep all the code in 1 assembly and section when it really needed to.

Do you have additional tips or tricks on this issue?

+5
source share
5 answers

I only split code into separate assemblies when I need to reuse it for two different applications (to a large extent). Therefore, I start with everything in one project, and when the need to reuse the code becomes obvious, I create a new assembly and move the code (sometimes it is obvious from the very beginning, for example, when you need to have a web application and win forms, thing).

Re. Namespaces, I prefer it to be well-organized, so it’s clear where each class belongs and what it should be used for.

+1
source

, . , , , Obfuscation, .

, , , , .

0

, , - , , , . ,

  • - . , . .
  • EngineUI - , , , - .
  • EngineServer - , ( -).
  • AppCore - , .
  • AppUI - ,
  • AppClient - AppUI, AppCore, EngineUI, . .
  • AppServer - AppServer, EngineServer, Engine. .

, , , . , , . , , , , (, ).

, , , .

0

, . , Womble Wmble Womble, :

Womble.ClientLibrary.dll
Womble.Controls.dll
Womble.Util.dll
Womble.Interop.dll

Womble , , , , DLL . , .

, . , , . "" , .

, , aseemblies. : , , .

, , , . Womble.Interop.dll, Womble.Controls.dll , , .

. ( ), . , .

0

, , , , .

.NET-, , , , NDepend.

NDepend, , . , . : , .

NDepend:

  • .
  • , .
  • Visual Studio " " Visual Studio.
  • Visual Studio " = True.
  • VS- .bat $rootDir $.
  • : $rootDir $\ bin\Debug $rootDir $\ bin\Release
  • $rootDir $\ bin .

  • .
  • , 500 2.000 LoC.
  • , , , , , .
  • , .
  • ( > 2.000 LoC), , .
  • , , / .
  • " " .

.NET Visual Studio

.NET

0
source

All Articles