how do you organize your namespaces?

怎甘沉沦 提交于 2019-12-05 11:37:33

For applications

Company.Product.Tier.Sub.Sub

where I like to get Tier from Model, View, Controller or other established names (Data)

But for our controls, we end up with

Company.Product.LogicalFeatureGrouping

or

Company.Product.Addon

sometimes it's

Company.Product.LogicalFeatureGrouping.Addon

Try to avoid the "and other stuff" or "misc." categories, If you are putting things in these categories you are failing to really organize them at all.

I usually create a namespace for every single tiers, like UI, business logic and database. It forces me to separate the tiers. I create other namespaces inside them according to system components.

I follow the Java / python ideal that namespaces should follow the directory structure.

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