Reputation: 11653
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:
Are there any good guides on this? I need to stop this mess.
Upvotes: 5
Views: 1307
Reputation: 4479
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.
Upvotes: 1
Reputation: 27710
I follow the Java / python ideal that namespaces should follow the directory structure.
Upvotes: 0
Reputation: 89242
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
Upvotes: 3
Reputation: 912
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.
Upvotes: 1