Good Namespace Naming Conventions

后端 未结 7 757
情话喂你
情话喂你 2021-01-14 06:00

I am creating a class library for a CRUD business application. The major \"categories\" of business objects (with related data access layer objects) are:

  • Maint
7条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-14 06:20

    It seems Ok to me anyway. I would stay away from abbreviations though, that would get confusing and force people to have to know the abbreviations or look them up. Also they become unreadable and unspeakable.

    "Lets take a look at the BusObjConfIntContYYYYmmdd package now..."
    

    One issue you might run into is names with subtle differences. With length of names being a possible issue, your eyes might gloss over the whole thing and pick up only part of it. Would there ever be a case where this happened?:

    BusinessObjects.Incidents.Classifications
    BusinessObjects.Classifications.Incidents
    

    or

    BusinessObjects.Forms.ProjectManager.Exportable.Windows.XP
    BusinessObjects.Forms.ProductManager.Exportable.Windows.XP
    

    That contrived example might become a problem.

提交回复
热议问题