你如何组织你的命名空间?
所以我有逻辑实体(人、国家等)、GUI 元素/控件、数据和导航控制器/管理器,然后是四叉树和计时器之类的东西,我总是努力将这些东西干净地分离到逻辑名称空间中。
我通常有这样的东西:
- Leviathan.GUI.Controls
- Leviathan.GUI.Views
- Leviathan.Entities
- Leviathan.Controllers(数据和其他东西)
- Leviathan.Helpers(树和其他东西)
这方面有什么好的指南吗? 我需要阻止这个混乱。
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.
I usually have something like this:
- Leviathan.GUI.Controls
- Leviathan.GUI.Views
- Leviathan.Entities
- Leviathan.Controllers (data and other stuff)
- Leviathan.Helpers (trees and other stuff)
Are there any good guides on this? I need to stop this mess.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(4)
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我遵循 Java / python 的理想,命名空间应该遵循目录结构。
I follow the Java / python ideal that namespaces should follow the directory structure.