Now, we could split them into the domain based on what they are used for:
final packages
We have created separate packages for:
- model: Our domain model objects such as our data classes
- services: Our services with the business logic on that domain, we may want to split the implementation
- controllers: Our controllers that expose our model and use the services
Each of these packages could grow if there are more model, services, or controllers classes to add.
Having our application layered in a way that we can understand is key for our microservice, however, no structure is perfect and you should decide which way you want to structure ...