Do I really need a service layer?

后端 未结 5 1140
执念已碎
执念已碎 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:12

    Right now, your service layer is trivial because your service is a trivial wrapping around database accesses. Is that all the app is? If not, when you start building the non-trivial parts, your service layer will expand.

提交回复
热议问题