教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 高中教育 >

2013武汉理工软件设计与体系结构复习(仅供参考)(2)

来源:网络收集 时间:2026-09-14
导读: 解决方案:分配职责给中间的调解对象来调解两个组件之间的关系。 9.防止编译 问题:如何设计对象,子系统和系统,使其内部的变化和不稳定不会对其他元素产生不良影响? 解决方案:识别设计变化或不稳定之处,分配

解决方案:分配职责给中间的调解对象来调解两个组件之间的关系。

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字,全部文档内容请下载后查看。喜欢就下载吧 ……
2013武汉理工软件设计与体系结构复习(仅供参考)(2).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/132152.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)