The carp.protocols subsystem right now seems to be two things:
a shared kernel which is used across many subsystems (such as device descriptors)
an application service to store/manage study protocols
For historical reasons, the domain objects in carp.protocols were defined there because this was the first subsystem created, and it is the core domain of the platform. But, in practice it turned out many of these types are used as DTOs across integration boundaries of the other subsystems.
We should reflect this and move these types to carp.common and indicate they are types used to pass across application services (e.g., place it in the application namespace). The domain namespace should be reserved for internals to subsystems.
domain.* imports in application service interfaces shouldn't be allowed. We could write a static checker to enforce that.
The
carp.protocols
subsystem right now seems to be two things:For historical reasons, the domain objects in
carp.protocols
were defined there because this was the first subsystem created, and it is the core domain of the platform. But, in practice it turned out many of these types are used as DTOs across integration boundaries of the other subsystems.We should reflect this and move these types to
carp.common
and indicate they are types used to pass across application services (e.g., place it in theapplication
namespace). Thedomain
namespace should be reserved for internals to subsystems.domain.*
imports in application service interfaces shouldn't be allowed. We could write a static checker to enforce that.