Java EE: Where could I read about dao, services and why they're used? [closed]

大兔子大兔子 提交于 2019-12-11 14:29:30

问题


Ok I'm new at my job, and now I'm assigned to a project which uses Spring, Hibernate and Wicket. And I see a lot of DAO and Services packages and I want to understand why they're used and what is advantajes of this.

I understand that DAO it's need for working with the databases, but I want more information.

I need an overall, a BIG PICTURE of DAO and Services layers.


回答1:


Take a look at Spring in Action. This book explains all essential aspects of Spring, DAOs and services.




回答2:


So the services are set up as the API to your application. Usually this is referred to as the service layer in a N-Tiered application. The Data Access Object layer is set up to provide business rules and access to the persistent data your application will store and access. The DAO's typically store the data in a database but can also persist it in other ways. Here are some suggestions for more details on this overview:

  • Baeldung - Spring Persistence Tutorial
  • JavaCodeGeeks - One Good Think
  • Spring - Data Access with JDBC
  • Stackoverflow question - Responsibilities and use of Service & Dao layers


来源:https://stackoverflow.com/questions/2026259/java-ee-where-could-i-read-about-dao-services-and-why-theyre-used

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!