All our components should be keep the data accessing (read and write), business logic and interface code separated
More specific a component should be composed of the following 3 layers:
- Data layer: The responsibility of this layer is to handle access to data. This includes:
- Sending and receiving messages on the message bus.
- Transmitting and receiving files
- Database and disk access
- Business logic: Handles the logic related to the different features. Examples are Get, Put, Integrity, etc.
specific logic. - Interface: The default interface to the component will be the API exposed by the logic layer. If other kinds of interfaces are needed, like bash, web, Swing these can be added on top of the logic layer.