The company where I work has recently decided to use a combination of .NET and Java for all future development efforts. We've been trying to standardize how we organize our code into namespaces (.NET) and packages (Java) and no one really has experience trying to organize namespaces for multiple products involving multiple platforms.
Recently, I got involved with a new product that uses a Java frontend (it runs on Blackberry devices) with a .NET backend (a message broker that allows the Java frontend to communicate with our legacy VB6/COM code, because we didn't want to deal with COM on the Java side and it's easy to make .NET work with our existing VB6 code). Right now I'm just focusing on the .NET side of things.
I created a new .NET solution called CompanyName.ProductName.Broker
, and ended up with two subprojects: a Core
class library project that implements the majority of the broker code, and a BrokerConsole
console project that allows the broker to started and stopped from the commandline (the broker will be running on a server along with a RabbitMQ message queue server).
Right now, both projects are in subnamespaces of the CompanyName.ProductName.Broker
namespace. The question is, does this make sense?
On the one hand, the BrokerConsole
project is pretty tightly-coupled to the Core
project, but on the other hand, the BrokerConsole
compiles to a standalone EXE. I was thinking it might make more sense to put the BrokerConsole
project into a separate root namespace, maybe something like CompanyName.Apps.ProductName
, because it's really a front-end to CompanyName.ProductName.Broker.Core.dll
and is an application as opposed to a library.
My rationale for creating an entirely new CompanyName.Apps
root namespace is that typically when you create an application, you put it into a separate namespace from the libraries you are referencing anyway (i.e. you wouldn't put your web server application into the System.Web
namespace). I'm thinking along the same lines, except that the referenced libraries happen to be libraries developed by the company.
Is this a good idea, or should I try and keep everything related to a "product" (in marketing terms) under a common CompanyName.ProductName
namespace? Are there better ways to manage multiple projects that together make up a single product?