| 查看: 398 | 回复: 4 | |||
| 当前主题已经存档。 | |||
p1801321金虫 (著名写手)
|
[交流]
重金求翻译
|
||
|
分隔线以上20币,以下10币,谢绝翻译软件,不给币 3.3 Examples Figure 10 shows a DSM for JUnit version 3.8.1, an open source regression testing framework. This DSM was created by loading the JUnit jar file into LDM and then applying the partitioning algorithm. The DSM shows that JUnit is a layered system with clean separation of the user interface layers from the underlying core logic. Figure 11 shows the DSM (created by the same process) for jEdit version 4.2, an open source editor with about 800 classes. Its layering, unlike JUnit’s, is not immediately apparent. The large number of dependencies in column 151 shows that there are a number of classes in the top level package jedit that reference most of the other subsystems. It also shows that most of the other subsystems also reference these classes. This suggests that a refactoring might be in order to reduce the coupling. 3.4 Design Rules The distinction between acceptable and unacceptable dependencies is expressed using design rules, which are provided by the user, and applied to the displayed DSM, in order to highlight the dependencies that violate the intended architectural design. A design rule may require, for example, that a library subsystem has no dependencies on the rest of the application, or that only certain parts of a core subsystem may depend on GUI modules. Continuous checking of design rules, akin to regression testing, can be used to keep a code base in sync with its design. Architectural creep becomes less of a problem, and flaws (especially those introduced by new team members) are caught as soon as they are introduced. The very expression of design rules has benefits that go beyond a shared articulation of design intent. When current design rules are violated for good reasons, it forces the revision of design rules thereby making architectural evolution explicit. ----------------------------------------------------- The DSM itself provides a convenient way to input design rules, by having the user click on cells to identify allowed or forbidden relationships. Design rules exploit the hierarchical structure too, since a rule specified for a subsystem can apply to all its constituents. 3.4.2 Using a DSM to Represent Design Rules In LDM, design rules are shown visually (Figure 12) by marking the corners of a cell with green and black to indicate whether a dependency is permitted. For a can-use rule, the cell has a green triangle in the upper left corner; for a cannot-use rule, the cell has a black triangle in the lower left corner. A dependency in a cell governed by a cannot-use rule is a design rule violation, indicated by a red triangle in the upper right corner. Note that often we turn off the display of the green triangle. This makes the display easier to read by enabling the user to focus on dependencies which are not permitted. In subsequent figures, a triangle in the lower left-hand corner of a cell shows where a dependency is prohibited, except for Figure 18, in which the triangles highlight violations. |
» 猜你喜欢
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有3人回复
参与限项
已经有3人回复
假如你的研究生提出不合理要求
已经有7人回复
实验室接单子
已经有4人回复
全日制(定向)博士
已经有4人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复
北核录用
已经有3人回复
syh9288
捐助贵宾 (著名写手)
海军上将
- 翻译EPI: 6
- 应助: 2 (幼儿园)
- 金币: 1598.6
- 散金: 543
- 红花: 1
- 帖子: 1046
- 在线: 475.4小时
- 虫号: 735351
- 注册: 2009-03-30
- 性别: GG
- 专业: 应用高分子化学与物理

2楼2009-12-11 09:21:49
syh9288
捐助贵宾 (著名写手)
海军上将
- 翻译EPI: 6
- 应助: 2 (幼儿园)
- 金币: 1598.6
- 散金: 543
- 红花: 1
- 帖子: 1046
- 在线: 475.4小时
- 虫号: 735351
- 注册: 2009-03-30
- 性别: GG
- 专业: 应用高分子化学与物理
|
例3 图10表示的是JUnit 3.8.1版本的设计性矩阵(DSM)----一种开放源码的回归测试框架。这种DSM的创立是通过这两步完成的,首先下载JUnit的jar格式文件到LDM中,然后运用到分区算法。DSM表明JUnit是一种分层系统,而且用户界面层与底层核心逻辑完全隔离。 图11表示的是jEdit version 4.2DSM(同一过程创立的,同上)------一个开放源码编辑器,它有着800类别。不像JUnit分层,它的分层不是很直接表面上就能看清楚的。大量的151列中的链接表明在最高水平的打包编辑器(这种编辑器与大部分其他子系统存在引用的关系)中有相当大的类别。它还表明:重构可能是为了减少联接。 |

3楼2009-12-11 09:47:05
syh9288
捐助贵宾 (著名写手)
海军上将
- 翻译EPI: 6
- 应助: 2 (幼儿园)
- 金币: 1598.6
- 散金: 543
- 红花: 1
- 帖子: 1046
- 在线: 475.4小时
- 虫号: 735351
- 注册: 2009-03-30
- 性别: GG
- 专业: 应用高分子化学与物理
|
3.4设计规则 可接受的和不可接受的链接之间的区分是通过用户提供的设计规则来表达的,为了突出那些与预期的设计规则不相适应的链接,我们将这种区分技术应用于显示的DSM。 例如,设计规则可能有这些要求:一个程序库的子系统不依赖于其他应用程序,或者,只有核心子系统的某些部分可以与GUI(图形用户接口模块)有联系。设计规则的连续性检查,类似于回归测试,可用来保持一个代码库与其设计同步。 结构的渐变不再是问题,只要这些缺陷被引入,他们(特别是那些被新团队成员引入的)会很很快被发现。 一种设计规则恰到好处的表达会超越一种通用的设计意图表达,这可以带了很多的好处。当现在的设计规则没有充分的理由证明其合理性,这将迫使我们修改设计规则从而使得架构演变的过程更明晰。 ———————————————————————————————————————————————————— |

4楼2009-12-11 10:19:20
syh9288
捐助贵宾 (著名写手)
海军上将
- 翻译EPI: 6
- 应助: 2 (幼儿园)
- 金币: 1598.6
- 散金: 543
- 红花: 1
- 帖子: 1046
- 在线: 475.4小时
- 虫号: 735351
- 注册: 2009-03-30
- 性别: GG
- 专业: 应用高分子化学与物理
|
通过让用户点击单元格来识别允许或禁止的关系,DSM本身就能为输入设计规则提供了一个便捷的途径。设计规则利用层次的设计结构,由于指定的子系统的规则可以适用于所有它的 组分。 3.4.2用DSM去表示设计规则 如图12所示,LDM设计规则是通过将单元格的边角标记为绿色或者黑色来表示的,这种颜色上的区别暗示着链接是否是被允许的。对于can-use规则,单元格左上角是绿色的三角形,对于cannot-use规则,单元格左下角有是黑色三角形。单元格中受cannot-use规则支配的链接是与设计规则不相适应的,右上角会用红色三角形表示。 注意,我们常常隐去标有绿色三角形的单元格,这种更清楚的显示让使用者能将注意力集中到不被容许的链接。在接下来的图中,单元格左下角有三角形的标记表明链接是禁阻的,除了图18,图18中三角形突出的是违反了设计规则。 |

5楼2009-12-11 10:48:59












回复此楼