I am having a long-term debate with my architect about architecture choices. The entreprise where I work in is migrating from a monolithic architecture to a microservices one.
The debate is located on the good approach for handling database access. One of us is standing there is no need for separating DAO and service (database access are directly handled by the service class), and the other stands for the contrary.
We are discussing about it for days, and I can't find good reason for convincing him, and he cannot either convince me.
The question is actually really simple: in an atomic REST microservice (a microservice handling only one REST method), should we have a separate DAO class or not? Which arguments could you give for separating, or keeping everything together?
This is a OOP oriented project (Java), if it matters.