P of EAA 总结

看了几遍了,就只在书上勾了下,也没什么总结。暂且先把关键内容摘抄如下:

Domain Logic Patterns

Transaction Script Organizes business logic by procedures where each procedure handles a single request from the presentation.

Domain Model An object model of the domain that incorporates both behavior and data.

Table Module A single instance that handles the business logic for all rows in a database table view.

Service Layer Defines an application’s boundary with a layer of services that establishes a set of available operations and coordinates the application’s response in each operation.

Data Source Architectural Patterns

Table Data Gateway An object that acts as a gateway to a database table. One instance handles all the rows in the table.

Row Data Gateway An object that acts as a gateway to a single record in a data source. There is one instance per row.

Active Record An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.(Why domain logic?)

Data Mapper A layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself.

Object-Relational Behavioral Patterns

Unit of Work Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.

Identity Map Ensures that each object gets loaded only once by keeping every loaded object in a map. Looks up objets using the map when referring to them.

Lazy Load An object that doesn’t contain all of the data you need but knows how to get it .

Object-Relational Structual Patterns

Identity Field Saves a database ID field in an object to maintain identity between an in-memory object and a database row.

Foreign Key Mapping Maps an association between objects to a foreign key reference between tables.

Association Table Mapping Saves an association as a table with foreign keys to the tales that are linked by the association.

Dependent Mapping Has one class perform the database mapping for a child class.

Embedded Value Maps an object into several fields of another object’s table.

Serialized LOB Saves a graph of objects by serializing them into a single large object(LOB), which it stores in a database field.

Single Table Inheritance Represents an inheritance hierarchy of classes as a single table that has columns for all the fields of the various classes.

Class Table Inheritance Represents an inheritance hierarchy of classes with one table for each class.

Concrete Class Inheritance Represents an inheritance hierarchy of classes with one table per concrete clas in the hierarchy.

Inheritance Mappers A structure to organize database mappers that handle inheritance hierarchies.

Object-Relational Metadata Mapping Patterns

Metadata Mapping Holds details of object-relational mapping in metadata.

Query Object An object that represents a database query.

Repository Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.

Web Presentation Patterns

Model View Controller Splits user interface interaction into three distinct roles.

Page Controller An object that handles a request for a specific page or action on a Web site.

Front Controller A controller that handles all requests for a Web site.

Template View Renders information into HTML by embedding markers in an HTML page.

Transform View A view that processes domain data element by element and transforms it into HTML.

Two Step View Turns domain data into HTML in two steps: first by forming some kind of logical page, then rendering the logical page into HTML.

Application Controller A centralized point for handling screen navigation and the flow of an application.

Distribution Patterns

Remote Facade Provides a coarse-grained facae on fine-grained objects to improve efficiency over a network.

Data Transfer Object An object that carries data between processes in order to reduce the number of method calls.

Offline Concurrency Patterns

Optimistic Offline Lock Prevents conflicts between concurrent business transactions by detecting a conflict and rolling back the transaction.

Pessimistic Offline Lock Prevents conflicts between concurrent business transactions by allowing only one business transaction at a time to access data.

Coarse-Grained Lock Locks a set of related objects with a single lock.

Implicit Lock Allows framework or layer supertype code to acquire offline locks.

Session State Patterns

Client Session State Stores session state on the client.

Server Session State Keeps the session state on a server system in a serialized form.

Database Session State Stores session data as committed data in the database.

Base Patterns

Gateway An object that encapsulates access to an external system or resource.

Mapper An object that sets up a communication between two independent objects.

Layer Supertype A type that acts as the supertype for all types in its layer.

Separated Interface Defines an interface in a separate package from its implementation.

Registry A well-known object that other objects can use to find common objects and services.

Value Object A small simple object, like money or a date range, whose equality is'n’t based on identity.

Money Represents a monetary value.

Special Case A subclass that provides special behavior for particular cases.

Plugin Links classes during configuration rather than compilation.

Service Stub Removes dependence upon problematic services during testing.

Record Set An in-memory representation of tabular data.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏向治洪

ssh搭建开发环境

公司一直不是ssh零配置的框架,每次写action都要在applicationcontext和struts里面配置,好麻烦,最近有空,写了一个ssh零配置的框架...

256100
来自专栏一个会写诗的程序员的博客

Kotlin + Spring Boot (Gradle) + React.js (Nowa) 集成 Web 开发

Kotlin + Spring Boot (Gradle) + React.js (Nowa) 集成 Web 开发

13220
来自专栏用户画像

SpringMVC token 防止表单重复提交

11920
来自专栏Java面试笔试题

三级下拉选

一级下拉选没有father_id,二级下拉选的father_id是一级下拉选的id,三级下拉选的father_id是二级下拉选的id,以此类推。 2、SQL

16810
来自专栏SpringBoot

springboot + jpa + redis + hibernate validator + 后台抽象

项目码云地址:https://gitee.com/DencyCheng/admin-api

29010
来自专栏一个会写诗的程序员的博客

13.6 SpringBoot集成Mongodb开发问题@EnableMongoRepositories路径配置13.6 SpringBoot集成Mongodb开发问题@EnableMongoRepo

Parameter 0 of constructor in com.restfeel.controller.BlogController required a ...

16120
来自专栏用户2442861的专栏

GDB调试Segmentation Fault

http://www.unknownroad.com/rtfm/gdbtut/gdbsegfault.html

18420
来自专栏指尖下的Android

OkHttp's NullPointerException in HttpUrl.class

今天测试在小米5.0-6.0的机型中测试发现一个空指针的异常,经过排查后发现OkHttp的请求参数不能为null,这个请求接口会上传当前机型的手机号、ip地址和...

52220
来自专栏岑玉海

RavenDb学习(六)查询补充特性

1、延迟加载 原来的查询方式如下: IEnumerable<User> users = session .Query<User>() .Wher...

30660
来自专栏Hongten

Hibernate Annotation (Hibernate 注解)

英文:http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/

20620

扫码关注云+社区

领取腾讯云代金券