Naming: solution, projects, namespaces and assemblies

别说谁变了你拦得住时间么 提交于 2019-12-05 13:13:41

问题


I'm working on naming guidelines for solutions, projects, their default namespaces and assemblies (Visual Studio). Now it looks like that: For example, we have a company named "Company" and a project named "Project". The project has business logic in separate dll, UI (WPF/WinForms) and a web part. There are names of things listed in the question title:

Solution name: "Project".

Business logic dll project name: "Project", default namespace: "Company.Project", assembly name: "Project".

UI project name: "ProjectUI", default namesapce: "Company.Project.UI" (it can be extended in case of multiple versions of UI, like "Company.Project.UI.WPF"), assembly name "Project" (working because it's not a dll).

Web project name: "ProjectWeb", default namespace: "Company.Project.Web", assembly name: "ProjectWeb" (for web applications).

My questions are: do you have guidelines like that? Is it a good idea to describe thoose things? What you think about my approach?

I'll be glad if you share ways that you use in your work.


回答1:


You may want to take a look at Microsoft's Namespace Naming Guidelines, which are by the way very similar to yours.




回答2:


I think it's definitely a good idea for everyone to work to standards like these. The only thing I might add is that if you do projects for other companies/customers you might want to name projects as follows:

YourCompanyName.CustomerCompanyName.ProjectName.ProjectUI



来源:https://stackoverflow.com/questions/1927667/naming-solution-projects-namespaces-and-assemblies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!