Tuesday, July 19, 2005

Namespace madness

At work we've been focusing on the design of our software application. One aspect of the design is Namespaces in .NET. At first we got carried away with namespaces nested under namespaces for these classes and then some more namespaces nested under those namespaces for those other namespaces. Oh but we didn't want to leave out these interfaces so we created another namespace nested that other namespace....bleh!!!

It became a mess really quick. So after much discussion while referring to the MSDN namespace guidelines we settled on a very shallow and flat namespace architecture. Basically it consists of our company name plus the technology name followed by some feature:

Acme.FooGenerator.Services
Acme.FooGenerator.Data
Acme.FooGenerator.Frameworks
Acme.FooGenerator.Presentation

The reason for the third level in our scheme is to note physical separation. The Acme.FooGenerator.Data classes are typically placed on our data server. Acme.FooGenerator.Presentation will typically live on a client somewhere. Acme.FooGenerator.Frameworks will be shared and if needed could be GAC'ed.

I think a simple scheme is a better scheme. We pondered the issue of naming conflicts but if classed are designed with some orderly hierarchy it could be very minimal.

Monday, July 18, 2005

Design Links


writings on design...nice!