I am a java web application developer.
And I found I am coufused with the layers in the server side.
I do not mean the MVC(model/view/control) but the dao/service layers.
Dao layers is used to conntect the database.
Why the service layer?
Since we use the spring mvc framework now,I used to process the login in the control including call the dao to fetch data. Is the service layer necessary?
There are several reasons for the service layer, but for me there are a few primary advantages:
Is the service layer necessary? Of course not--but technically no layers are necessary; everything could be wrapped up in a JSP page. It's a matter of granularity, control, and separation of concerns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With