Skip to content

Commit

Permalink
fix 图片路径
Browse files Browse the repository at this point in the history
  • Loading branch information
gdut-yy committed Jan 1, 2020
1 parent cc870d5 commit ca1f5ed
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions docs/ch3.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Models come in many varieties and serve many roles, even those restricted to the
## 3.1 MODEL-DRIVEN DESIGN 模式:MODEL-DRIVEN DESIGN

![](/figures/ch3/03inf01.jpg)
![](figures/ch3/03inf01.jpg)

The astrolabe, used to compute star positions, is a mechanical implementation of a model of the sky.

Expand Down Expand Up @@ -312,13 +312,13 @@ The application requires import/export logic, which we’ll encapsulate into som

> 这个程序还需要导入/导出逻辑,我们可以将其封装成一些简单的服务。
![](/figures/ch3/t0056_01.jpg)
![](figures/ch3/t0056_01.jpg)

We’ll also need a few utilities:

> 我们还需要几个工具类:
![](/figures/ch3/t0056_02.jpg)
![](figures/ch3/t0056_02.jpg)

Now, starting the application is a matter of initializing the repositories with imported data:

Expand Down
4 changes: 2 additions & 2 deletions docs/ch4.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Sophisticated techniques for this isolation have emerged. This is well-trodden g
## 4.1 LAYERED ARCHITECTURE 模式:LAYERED ARCHITECTURE

![](/figures/ch4/04inf02.jpg)
![](figures/ch4/04inf02.jpg)

For a shipping application to support the simple user act of selecting a cargo’s destination from a list of cities, there must be program code that (1) draws a widget on the screen, (2) queries the database for all the possible cities, (3) interprets the user’s input and validates it, (4) associates the selected city with the cargo, and (5) commits the change to the database. All of this code is part of the same program, but only a little of it is related to the business of shipping.

Expand Down Expand Up @@ -42,7 +42,7 @@ The value of layers is that each specializes in a particular aspect of a compute

> 分层的价值在于每一层都只代表程序中的某一特定方面。这种限制使每个方面的设计都更具内聚性,更容易解释。当然,要分离出内聚设计中最重要的方面,选择恰当的分层方式是至关重要的。在这里,经验和惯例又一次为我们指明了方向。尽管 LAYERED ARCHITECTURE 的种类繁多,但是大多数成功的架构使用的都是下面这 4 个概念层的某种变体。
![](/figures/ch4/t0070_01.jpg)
![](figures/ch4/t0070_01.jpg)

Some projects don’t make a sharp distinction between the user interface and application layers. Others have multiple infrastructure layers. But it is the crucial separation of the domain layer that enables MODEL-DRIVEN DESIGN.

Expand Down
14 changes: 7 additions & 7 deletions docs/ch5.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ But if we need to fetch the data from a relational database, another implementat
Table: BROKERAGE_ACCOUNT

![](/figures/ch5/t0086_01.jpg)
![](figures/ch5/t0086_01.jpg)

Table: CUSTOMER

![](/figures/ch5/t0086_02.jpg)
![](figures/ch5/t0086_02.jpg)

Table: INVESTMENT

![](/figures/ch5/t0086_03.jpg)
![](figures/ch5/t0086_03.jpg)

```java
public class BrokerageAccount {
Expand Down Expand Up @@ -232,7 +232,7 @@ Carefully distilling and constraining the model’s associations will take you a
## 5.2 ENTITIES (A.K.A. REFERENCE OBJECTS) 模式:ENTITY(又称为 REFERENCE OBJECT)

![](/figures/ch5/05inf01.jpg)
![](figures/ch5/05inf01.jpg)

Many objects are not fundamentally defined by their attributes, but rather by a thread of continuity and identity.

Expand Down Expand Up @@ -384,7 +384,7 @@ Given all these technical problems, it is easy to lose sight of the underlying c
## 5.3 VALUE OBJECTS 模式:VALUE OBJECT

![](/figures/ch5/05inf02.jpg)
![](figures/ch5/05inf02.jpg)

Many objects have no conceptual identity. These objects describe some characteristic of a thing.

Expand Down Expand Up @@ -576,7 +576,7 @@ ENTITIES and VALUE OBJECTS are the main elements of conventional object models,
## 5.4 SERVICES 模式:SERVICE

![](/figures/ch5/05inf03.jpg)
![](figures/ch5/05inf03.jpg)

Sometimes, it just isn’t a thing.

Expand Down Expand Up @@ -670,7 +670,7 @@ Partitioning Services into Layers

> 将 SERVICE 划分到各个层中
![](/figures/ch5/t0107_01.jpg)
![](figures/ch5/t0107_01.jpg)

### 5.4.2 Granularity 粒度

Expand Down
6 changes: 3 additions & 3 deletions docs/ch6.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Modeling AGGREGATES and adding FACTORIES and REPOSITORIES to the design gives us
## 6.1 AGGREGATES 模式:AGGREGATE

![](/figures/ch6/06inf01.jpg)
![](figures/ch6/06inf01.jpg)

Minimalist design of associations helps simplify traversal and limit the explosion of relationships somewhat, but most business domains are so interconnected that we still end up tracing long, deep paths through object references. In a way, this tangle reflects the realities of the world, which seldom obliges us with sharp boundaries. It is a problem in a software design.

Expand Down Expand Up @@ -234,7 +234,7 @@ AGGREGATES mark off the scope within which invariants have to be maintained at e
## 6.2 FACTORIES 模式:FACTORY

![](/figures/ch6/06inf02.jpg)
![](figures/ch6/06inf02.jpg)

When creation of an object, or an entire AGGREGATE, becomes complicated or reveals too much of the internal structure, FACTORIES provide encapsulation.

Expand Down Expand Up @@ -456,7 +456,7 @@ A FACTORY encapsulates the life cycle transitions of creation and reconstitution
## 6.3 REPOSITORIES 模式:REPOSITORY

![](/figures/ch6/06inf03.jpg)
![](figures/ch6/06inf03.jpg)

Associations allow us to find an object based on its relationship to another. But we must have a starting point for a traversal to an ENTITY or VALUE in the middle of its life cycle.

Expand Down
2 changes: 1 addition & 1 deletion docs/ch8.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Eight. Breakthrough
![](/figures/ch8/08inf01.jpg)
![](figures/ch8/08inf01.jpg)

The returns from refactoring are not linear. Usually there is a marginal return for a small effort, and the small improvements add up. They fight entropy, and they are the frontline protection against a fossilized legacy. But some of the most important insights come abruptly and send a shock through the project.

Expand Down

0 comments on commit ca1f5ed

Please sign in to comment.