dimanche 13 novembre 2022

Do I really need a service layer/classes along with springboot RestController if I'm not adding any business logic?

I understand that it is advisable to add Service along with Controller classes keeping the best practices in the mind. Say, if I have to create a dump-api which is responsible to dump all inbound data on Kafka topic in the Kafka cluster without any logic. I believe best practices are meant to get the best out of an application, and I believe skipping service layer is serving the purpose.

So, do I really need service layer in this case since I have to make my application light-weight?

I tried reading some blogs on best practices and architectural blogs (on lightweight and performance talk) but didn't find my answer.

Aucun commentaire:

Enregistrer un commentaire