I have a group of interconnected classes that are all overridden to create a specific implementation. I'm wondering if it's worth wrapping interconnected subclasses in a namespace.
As an example, consider the following namespaces and classes:
namespace Protocol
{
public abstract class Message { }
public abstract class Driver { }
}
namespace Protocol.Tcp
{
public class TcpMessage : Message { }
public class TcpDriver : Driver { }
}
namespace Protocol.Ftp
{
public class FtpMessage : Message { }
public class FtpDriver : Driver { }
}
What is the best way to structure namespaces? It seems inevitable to reveal inheritance in the namespace, since the base classes do not really belong in either the Protocol.Tcp namespace or the Protocol.Ftp namespace.
source
share