你如何组织你的命名空间? [英] how do you organize your namespaces?
本文介绍了你如何组织你的命名空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以,我有逻辑实体(人,国家等),GUI元素/控制,数据和导航控制器/经理,然后像四树和计时器,我总是用干净分离这些东西放到逻辑命名空间中挣扎
So I have logical entities (person, country, etc.), GUI elements / controls, data and navigation controllers / managers, then things like quad-trees and timers, and I always struggle with cleanly separating these things into logical namespaces.
我通常是这样的:
- Leviathan.GUI.Controls
- Leviathan.GUI.Views
- Leviathan.Entities
- Leviathan.Controllers(数据和其他的东西)
- Leviathan.Helpers(树木和其他的东西)
有没有这个什么好导游?我需要停止这种混乱局面。
Are there any good guides on this? I need to stop this mess.
推荐答案
有关应用程序
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
或
Company.Product.Addon
有时它的
Company.Product.LogicalFeatureGrouping.Addon
这篇关于你如何组织你的命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文