prowla2003 Posted June 23, 2003 Posted June 23, 2003 any ideas on this... i've got a web application and was thinking of having namespaces like... companyname.datamanager companyname.booking companyname.vehicle these would also be the class names or very similar to... there are a many examples with namespaces such as companyname.datatier.booking companyname.datatier.vehicle i dont see the point in this... maybe there is when you have bigger applications than we have... or if you ever intend to split the different tiers on to different machines.. which i dont ever see happening any data managing happens in the datamanager class/namespace do i really need to split the namespaces the "Microsoft" way?? are there any other good reasons or articles people know of on how to organise things? Quote
*Experts* mutant Posted June 23, 2003 *Experts* Posted June 23, 2003 Namespaces were mainly made so there was no conflicts with the names of the object. But they provide great organization too, for example lets say you dont know the name of some class but you know it should be in System.IO becuase it does something with a file, you look through that namespace instead of all 3500 classess. You dont really need them for small projects, but iff it gets bigger it can be a lot of help. Quote
prowla2003 Posted June 23, 2003 Author Posted June 23, 2003 ok so would you be suggesting not to use namespaces at all? or just a companyname namespace? the basic object model we got is about 10 classes each will inherit from DataManager.. i can see that it doesn't really help "the organisation" of the classes to split that up into namespaces and i cant see us having huge numbers of classes in the future does anyone think different - just trying to get other peoples ideas on how anyone else has put together solutions Quote
*Gurus* divil Posted June 23, 2003 *Gurus* Posted June 23, 2003 For small projects it's common to just place everything in one namespace, the name of the company or even the name of the product. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
prowla2003 Posted June 23, 2003 Author Posted June 23, 2003 whats the definition of "small projects"!?!? Quote
*Experts* Volte Posted June 23, 2003 *Experts* Posted June 23, 2003 If there are only a few classes (maybe up to 15 or so), and you can stick them all in one namespace, then do that. If the classes start getting confusing, then start splitting them up. For example, if you have written some Socket wrapper and helper classes for your project, you might consider putting those in the namespace "MyCompany.Sockets" and you might want to put data object classes in "MyCompany.DataObjects". You organize it how you are comfortable with it; there's no required way to do it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.