How can I convince skeptical colleagues about the right namespaces in .NET?

My team is working on a conversion project to convert a single product (but with many faces) from VB6 to .Net (we have more than ~ 300,000 LOC). Before I went on board, it was decided that regardless of the location of the assembly or folder structure, all classes / structures will be in the same namespace:

.

They even go as far as modifying the developer code, developer code, developer code, etc., to ensure uniformity. How to convince them that using a namespace is good? What is the proper use of the namespace and what are the pros and cons? I guess it's hard for me to understand why my colleagues will go through so much trouble to save a few lines. Any external, authoritative links to support your argument will be highly appreciated. Please, help!

+5
source share
11 answers

Good answers already

I read a lot of good answers (the image of the driver folder is good, for example, as a division / organization of an object / concept).

, , "" , , , , , .

#, VB.NET, Java, ++, , , , / - . , Mozilla JavaScript.

, " "... ^ _ ^

, " ".

VB.NET VB6, ++ C-like, ++.

...

, , .

( ++, " ", C- , , , ), .

:

  • < > > User
  • < > >
  • < > Id
  • < > > User
  • < >

/ , "" "" , , ?

"" , (, , , ):

MyUtil DLL, MyKernel DLL MyGui DLL? , :

  • < > MyUtil _ > -
  • < > MyUtil _ > SomethingElse
  • < > MYKERNEL _ > YetAnotherObject
  • < > MYKERNEL _ > AnotherThing
  • < > MyGui _ > SomeGui

/?

, , .

, ( "9 " ), ... , , .

...

, " " , , ( , , braindead).

, " " (? , , Top Gun Microsoft?), , .NET( ) , , ( ).

VB.NET/.NET , , ++, .

, , , , . ( VB.NET):

Imports MyWholeProject

Class HelloWorld

   Public Sub Main()
      Dim o As MyModuleAAA_MyObject = New MyModuleAAA_MyObject
      Dim t As MyModuleBBB_MyThing = New MyModuleBBB_MyThing
      Dim g As MyModuleCCC_MyGizmo = New MyModuleCCC_MyGizmo
      REM etc.
   End Sub

End Class

, :

Imports MyWholeProject.MyModuleAAA
Imports MyWholeProject.MyModuleBBB
Imports MyWholeProject.MyModuleCCC

Class HelloWorld

   Public Sub Main()
      Dim o As MyObject = New MyObject
      Dim t As MyThing = New MyThing
      Dim g As MyGizmo = New MyGizmo
      REM etc.
   End Sub

End Class

, , . , MyModuleAAA - , MMAAA... .. ..

.NET Googling, : http://www.vbdotnetheaven.com/UploadFile/ggaganesh/NamespacesInVbDotNet04202005005133AM/NamespacesInVbDotNet.aspx

, /

/...

, 2 ( ), , , . , , .

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

, , : , - .

, , , . , , -, - , ?

- , . , , , ", (: ) , , , > ".

( )

( , " , ?" ), , , , . , , , . .

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

, -, ... , , - , ...

+7

- , , .. ... , , C:...

, , , , , .

+5

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

. , , [ , , ]. , . , , , .

, . , , , , ; . , , . .

+3

, , , , - . , -, :

  • (, ..) .

  • .

, , - - , , .

+2
  • , .

  • "", Network.Session, Meeting.Session, WebServer.Session .. , . , . , System.Web.DLL System.Messaging.DLL. , (DLL), , ( ).

  • - , , . , DLL , . , Microsoft .NET ""? ? , WindowsFormsTextBox WebUIWebControlsTextBox - . .

, . , .

+2

, .

, , . MSDN ..

, - - , - //.

. (, ).

, . !; -)

+1

, : , - , .

0

, use/Imports , .

0

, , "The One True Namespace" - , , , , , , , . .

0

VB6 VB6, , , .net. ( , VB6 ?) , , .net.

0

? , BCL ?

0

All Articles