2013武汉理工软件设计与体系结构复习(仅供参考)(2)
解决方案:分配职责给中间的调解对象来调解两个组件之间的关系。
9.防止编译
问题:如何设计对象,子系统和系统,使其内部的变化和不稳定不会对其他元素产生不良影响?
解决方案:识别设计变化或不稳定之处,分配职责用以在这些变化之外创建稳定接口。
GRASP用职责设计对象:"Designing Objects with Responsibilities".它包含了9个基本模式: 1.信息专家(Information expert) 2.创建者(Creator) 3.高内聚(High Cohesion) 4.低耦合(Low Coupling) 5.控制器
(Controller) 6.多态性(Polymorphism) 7.纯虚构(Pure Fabrication)
8.间接性(Indirection) 9.变化预防(Protected Variations) GRASP的主要特征: - 对象职责分配的基本原则。 - 主要应用在分析和建模上。 GRASP的核心思想的理解: 自己干自己的事(职责的分配) 自己干自己的能干的事(职责的分配) 自己只干自己的事(职责的内聚)
常见的架构风格
1.Pipe and Filter Architectural Style
Suitable for applications that require a defined series of independent computations to be performed on ordered data.
A component reads streams of data on its inputs and produces streams of data on its outputs.
filters, apply local transformations to their input streams and often do their computing incrementally so that output begins before all
input is consumed.
called pipes, serve as conduits for the streams, transmitting outputs of one filter to inputs of another.
2.Object-Oriented Style
Suitable for applications in which a central issue is identifying and protecting related bodies of information (data).
Data representations and their associated operations are encapsulated in an abstract data type.
objects.
are function and procedure invocations (methods).
3.Implicit Invocation Style
Suitable for applications that involve loosely-coupled collection of components, each of which carries out some operation and may in the
process enable other operations.
Particularly useful for applications that must be reconfigured on the fly:
Changing a service provider.
Enabling or disabling capabilities.
Instead of invoking a procedure directly ...
2013武汉理工软件设计与体系结构复习(仅供参考) 软件
A component can announce (or broadcast) one or more events.
Other components in the system can register an interest in an event
by associating a procedure with the event.
When an event is announced, the broadcasting system (connector)
itself invokes all of the procedures that have been registered for the
event.
An event announcement “implicitly” causes the invocation of procedures in other modules.
4.Client-Server Style
Suitable for applications that involve distributed data and processing across a range of components.
Servers: Stand-alone components that provide specific services such
as printing, data management, etc.
Clients: Components that call on the services provided by servers.
The network, which allows clients to access remote servers.
yered Style
Suitable for applications that involve distinct classes of services that can be organized hierarchically.
Each layer provides service to the layer above it and serves as a client to the layer below it.
Only carefully selected procedures from the inner layers are made available (exported) to their adjacent outer layer.
are typically procedure calls under restricted visibility
6. Repository Style
Suitable for applications in which the central issue is establishing, augmenting, and maintaining a complex central body of information.
Typically the information must be manipulated in a variety of ways. Often long-term persistence is required.
A central data structure representing the correct state of the system.
A collection of independent components that operate on the central
data structure.
Typically procedure calls or direct memory accesses.
7.Interpreter Style
Suitable for applications in which the most appropriate language or machine for executing the solution is not directly available.
include one state machine for the execution engine and three memories:
current state of the execution engine
program being interpreted
current state of the program being interpreted
2013武汉理工软件设计与体系结构复习(仅供参考) 软件
procedure calls
direct memory accesses
8. Process-Control Style
Suitable for applications whose purpose is to maintain specified properties of the outputs of the process at (sufficiently near) given reference values.
Process Definition includes mechanisms for manipulating some
process variables.
Control Algorithm for deciding how to manipulate process variables.
are the data flow relations for:
Process Variables:
Controlled variable whose value the system is intended to
control.
Input variable that measures an input to the process.
Manipulated variable whose value can be changed by the
controller.
Set Point is the desired value for a controlled variable.
Sensors to obtain values of process variables pertinent to control.
1.管道和过滤器架构风格
适用于需要定义一系列的执行规则数据的独立运算。
组件在输入时读数据流,在输出时产生数据流。
组件:称为过滤器,应用于对局部的输入流的转换,经常增长的计算,因此,在输入结束前输出就开始了。
. 连接器:称为管道,给流提供管道,把一个过滤器的输出传输到另一个输入。
2.面向对象风格
适用于主要问题是识别和保护信息的相关主体。
数据代理和它们相关的操作封装在一个抽象数据类型里面。
组件:对象
连接器:功能和过程调用(方法)
3.隐式调用风格
应用于涉及到组件的松耦合集,其中的每一个都执行一些操作,还可能允许其他的操作。
…… 此处隐藏:4274字,全部文档内容请下载后查看。喜欢就下载吧 ……相关推荐:
- [高中教育]电子线路高频非线性部分2.1
- [高中教育]中班美术活动——我的小手
- [高中教育]常用三极管参数大全
- [高中教育]计算机常见故障及解决办法
- [高中教育]风机基础环水平度控制方法探讨
- [高中教育]机械安全工程(专升本)阶段性作业3
- [高中教育]2009年安徽省高考语文考试说明刍议
- [高中教育]unit5 let's eat公开课教案设
- [高中教育]计算机网络原理课后习题答案
- [高中教育]2016-2022年中国新能源市场研究与投资
- [高中教育]2015-2020年中国会议行业市场评估及投
- [高中教育]经销商大会峰会主持人串词开场白
- [高中教育]2014新版北师大数学三年级上册小熊购物
- [高中教育]七年级第一学期体育与健康全套教案
- [高中教育]第三章:国际金融市场
- [高中教育]六年级下册数学单元测试-2.比例 北师大
- [高中教育]2016年上海海事大学法学院624刑法之《
- [高中教育]中国碳化钙产业竞争现状及未来五年投资
- [高中教育]网络时代,我们怎么玩
- [高中教育]圆锥曲线——高中数学基础知识与典型例
- 高集医院世界艾滋病宣传日活动方案
- 苏教版六年级英语上册期末试卷含答案
- 全民枪战生化英雄模式幽灵怎么玩 生化
- 灿烂的宋元文化一导学案
- 第2章货币资金与应收款项
- 北师大版八年级下册数学第三章《分式》
- 浅析高分子材料成型加工技术
- 华南理工大学2013年度共青团先进集体及
- 教师资格科目二小学教案模板(共合集)
- 工程扩建可研报告
- 中华人民共和国海事局2014年度招录公务
- 提高农村小学生作文能力的教学尝试
- 徒手心肺复苏术操作步骤
- 毛概试题库7-15章
- 2014-2015学年度(上)初中班主任工作计
- 企业驾驶员安全生产责任书
- 第07章 不等式测试题-2016年高考文科数
- 医疗器械经营企业工作程序
- 考研英语必背36篇_彩版_精华
- 初中9月13-15假期作业 (1)




