Object-oriented architecture: three-layer architecture (presentation layer, business layer, and persistence layer)

Source: Internet
Author: User

Object-oriented architecture: three-layer architecture (presentation layer, business layer, and persistence layer)

Three-tier architecture: presentation layer, business layer, and persistence layer.

① Persistence layer: uses the DAO mode to establish object class and database table ing (ORM ing ). That is, which class corresponds to which table and which attribute corresponds to which column. Persistent Layer

The purpose is to convert object data and relational data.

② Business layer: adopts the transaction Script Mode. Encapsulates all operations in a business into a method, and ensures all database update operations in the method.

Failed or both. Avoid data confusion caused by some successful operations.

③ Presentation layer: the MVC mode is used.

M is called a model, that is, an entity class. It is used for data encapsulation and data transmission.

V is a view, that is, a GUI component, used to display data.

C is the control, that is, the event, used for process control.

 

Design principles:

Design Principle of the business layer interface: one entity class and one interface, one business method submitted at a time. The parameters of the Business Method come from the presentation layer.

Persistence layer interface design principle: an object class, an interface, a persistent Method for one database operation.

Related Article

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.