J2EE design mode Reading Notes (2)-business layer mode

Source: Internet
Author: User

Business Layer Mode

Composite entity (data from different sources is centralized into a single object to reduce complexity and open-ended messaging)
Domain object model (create an object that represents the underlying application concept and is related to a specific domain)
Data transmission mode (use DTO for sending and receiving data)
Row set DTO (execute the data query and convert the result into a row set DTO)

Business-layer database mode

DAO Factory (used to create the DAO factory in a centralized manner, so that you can configure DAO attributes in a centralized manner at runtime and use reflection more)
Data Access Object (separating persistence from data processing code)
IsDirty (determine whether data is updated before updating the database to avoid unnecessary database update operations)
Late loading (only loading the minimum data currently required to improve performance)
Process Access Object (provides a common Java interface for accessing database stored procedures, usually in command mode)
Master/Jian batch Builder (efficient generation of unique identifiers)
Serialization entity mode (serialize Java objects to the database)
Primary Key Stored Procedure Mode (use a stored procedure to create a record and return a primary key, and use the primary key management of the database)
Table inheritance (class inheritance ing in the database)
Tuples table mode (map objects to a table in the database)

Service layer interface mode

Business proxy Factory (create a business proxy using the factory, and the Business proxy is responsible for calling the business object to complete the work)
Service adapter (transforming data into Java objects to simplify access to remote business data)
ServiceLocator, used to simplify remote object locating)
Session appearance (SessionFacade, which reduces the number of remote calls by remotely encapsulating local calls)

Business-layer concurrency Mode

ACID transaction mode (the Transaction Manager is used as the gateway of the persistent layer or domain object to ensure data atomicity, consistency, independence, and durability)
Lockable object mode (enabling the object to implement lockable interfaces-lock (), unlock (), getLockUser (), isLocked ())
Lock manager mode (provides a lock manager for business objects or data objects to manage locks in a unified manner)
Optimistic Concurrency mode (assuming there are few concurrency conflicts)
Pessimistic concurrency mode (assuming that concurrency occurs frequently and write locks are used)
Transaction context mode (multiple objects are allowed to participate in a separate transaction, and the transaction context is responsible for starting the transaction, committing the transaction, creating and returning the connection)
Version Number mode (provides the version number for the object to conveniently detect whether the object has been modified)

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.