Service classes for business logic | SoloLearn: Learn to code for FREE!


Service classes for business logic

Hi. Is it bad practice to create service classes that do not use a api or database, but only business logic? Thanks!

2/7/2018 5:09:01 AM

Michael Vorm Jensen

1 Answer

New Answer


As far as I'm aware, this is good practice. We often have a Service/DAO layer, the DAOs job is to interact with the database - the service will use the results handed to it by the DAO to apply business logic, good example of the Single Responsibility Principal