Do I really need a service layer?

后端 未结 5 1139
执念已碎
执念已碎 2020-12-08 07:51

My web application is written using Spring MVC + Hibernate.

  • My model is \"Customer\" entity POJO.
  • I have got a DAO object \"CustomerDAO\", its method
5条回答
  •  情歌与酒
    2020-12-08 08:06

    There are other things that you at service layer. Sometime its about applying business rules before passing any action to DAO. Sometimes one service needs to interact with other services, DAO for the business rules requirement.

    Tell us how you'll do without server layer and with an interface..high level idea, will help me to tell you more.

提交回复
热议问题