Functional distinction in Java in the action layer, service layer, modle layer, and DAO layer

Source: Internet
Author: User

The DAO layer uses Hibernate to connect to the database, to manipulate the database (add and revise). Service layer: Reference to the corresponding DAO database operation, where you can write your own code (such as simple judgment). Action layer: reference to the corresponding service layer, where the combination of struts configuration file, jump to the specified page, of course, can accept the page to pass the request data, can also do some calculation processing. All of the above hibernate,struts need to be injected into spring's configuration file, and spring links these together to become a whole.

General Java is a three-tier architecture data Access Layer (DAO) Business Logic Layer (biz or services) interface layer (UI) action is part of the business layer and is a manager (the main switch) (the function is to reverse) (take out the foreground interface data, call the Biz method, Forward to the next action or page) the model is generally a physical object (which turns the real thing into an object in Java) that temporarily stores the data for easy persistence (either in a database or in writing to a file) but Encapsulating some data as a package to use DAO in different layers and various Java objects is the data access layer that is used to access the database for data persistence (persisting the in-memory data to the hard disk)

DAO mainly does the interactive work of the database modle is the model to store your entity class service to do the corresponding business logic processing action is a controller

Ext.: http://blog.csdn.net/limuzi13/article/details/44968819

Functional distinction in Java in the action layer, service layer, modle layer, and DAO layer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.