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.

目录
相关文章
|
Java p3c
sonar入门:使用阿里规范扫描代码质量
sonar入门:使用阿里规范扫描代码质量
1561 0
sonar入门:使用阿里规范扫描代码质量
|
23天前
|
关系型数据库 MySQL Java
DDD面试题:DDD聚合和表的对应关系是什么 ?(来自蚂蚁面试)
尼恩,一位40岁的资深架构师,分享了其读者群中关于DDD(领域驱动设计)的面试题及解答,涵盖DDD架构落地、微服务拆分、聚合与MySQL表的对应关系等内容。尼恩通过系统化的梳理,帮助读者在面试中展现强大的技术实力,让面试官印象深刻。此外,他还提供了《尼恩Java面试宝典》等多本技术圣经PDF,助力读者提升架构、设计和开发水平。关注【技术自由圈】公众号,获取更多资源。
DDD面试题:DDD聚合和表的对应关系是什么 ?(来自蚂蚁面试)
|
6月前
|
域名解析 存储 缓存
【域名解析DNS专栏】DNS缓存机制详解:如何提升域名解析速度
【5月更文挑战第21天】本文探讨了DNS缓存机制的原理及优化方法。DNS缓存是存储已解析域名与IP地址的临时数据库,能减少网络延迟,减轻服务器负担并提升用户体验。优化策略包括增加缓存容量,设置合理过期时间,使用智能DNS服务及定期清理缓存。文中还提供了一个Python示例,展示如何通过缓存提升域名解析速度。
645 2
【域名解析DNS专栏】DNS缓存机制详解:如何提升域名解析速度
|
6月前
|
存储 设计模式 前端开发
MVC架构和DDD架构的区别?
最近在学习一个开源社区项目,第一次听说了DDD项目架构,于是通过搜索之后来分享给大家
|
存储 弹性计算 人工智能
阿里云服务器4核16g配置5M带宽收费标准及优惠价格参考
阿里云服务器4核16g配置5M带宽多少钱?阿里云服务器支持按量(小时)付费和按月付费及按年付费,4核16g配置按量付费收费标准最低0.8元每小时,按月收费最低收费标准为384.0元1个月,实际购买中,新老用户均可通过阿里云活动下单购买,相对来说通过活动下单购买更加便宜。
410 0
阿里云服务器4核16g配置5M带宽收费标准及优惠价格参考
|
6月前
|
JSON Kubernetes Go
无缝集成:在IntelliJ IDEA中利用Kubernetes插件轻松管理容器化应用
无缝集成:在IntelliJ IDEA中利用Kubernetes插件轻松管理容器化应用
248 0
无缝集成:在IntelliJ IDEA中利用Kubernetes插件轻松管理容器化应用
|
存储 弹性计算 安全
从大模型到大降价,阿里云被集成战略背后的底气
“过去几个月,我碰到的所有客户、所有伙伴,包括我们所有的企业都在思考一个问题,就是如何用新一代的人工智能技术来武装自己。” 4月26日,当阿里巴巴董事会主席兼CEO张勇第一次以阿里云智能CEO的身份出现在阿里云合作伙伴大会上时指出,大模型让所有企业站在了同一起跑线上,再次激活了千行百业。
602 0
|
前端开发 Java
Springboot简单利用@RestControllerAdvice优雅的捕获异常
Springboot简单利用@RestControllerAdvice优雅的捕获异常
117 0
|
消息中间件 存储 前端开发
【DDD】全网最详细2万字讲解DDD,从理论到实战(代码示例) 2
【DDD】全网最详细2万字讲解DDD,从理论到实战(代码示例)
745 0
使用SnakeYaml进行解析时,忽略yaml中无法在类中找到属性的字段
使用SnakeYaml进行解析时,忽略yaml中无法在类中找到属性的字段