27
Cognitive Objects & Cognitive Objects & Modeling Aspects Modeling Aspects Hongyan Zhang Hongyan Zhang [email protected] [email protected] 1 作作 作作作

第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Embed Size (px)

DESCRIPTION

系统业务模型分析参考课件

Citation preview

Page 1: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Cognitive Objects & Cognitive Objects & Modeling AspectsModeling Aspects

Hongyan ZhangHongyan Zhang

[email protected]@sina.com

11作者:张红延

Page 2: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

作者:张红延作者:张红延

Computer System

Business Process

定单

货物

通过 ... 交货

“Modeling is an process to capture system nature”

Dr. James Rumbaugh

Visual Modeling need to use UML Language

Visual Modeling

22

Page 3: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

作者:张红延作者:张红延

Use Case Analysis– Capture business processes from the view of user

Visual Modeling—Capture Business Process

33

Page 4: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

作者:张红延作者:张红延

Capture business objects & logics with visual modeling

Analysis & design application with visual modeling

Visual Modeling—Facilitate Communication

作者:张红延 44

Page 5: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

作者:张红延作者:张红延

可视化建模 --管理复杂性

将模型划分成不同的视图(结构、行为等) ; 用包( Package )将视图组织成一棵抽象层次渐深的树形结构 .

55

Page 6: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

作者:张红延作者:张红延

GUI(Visual Basic,

Java) Business Logic(C++, Java)

Database Administrator(C++ & SQL)

System Model is independent from implementation

language

Visual Modeling—Define Software Architecture

66

Page 7: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

作者:张红延作者:张红延

Various System / Platform

可复用构件

Visual Modeling—Facilitate Software Reuse

77

Page 8: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

How to Model

Observe and analysis things from different Observe and analysis things from different views/aspects as well as depict them on different views/aspects as well as depict them on different abstract levels (detail level)abstract levels (detail level)

Modeling process is the process of analysis & Modeling process is the process of analysis & design ,models are useful results to realize effective design ,models are useful results to realize effective communication between team memberscommunication between team members

One model is depiction of the nature of thing on some One model is depiction of the nature of thing on some aspect . There exist interrelationship among all aspect . There exist interrelationship among all thing’s aspects , which can used to verify the thing’s aspects , which can used to verify the consistency and Completeness between different consistency and Completeness between different models.models. 。。 Verification is important work of quality Verification is important work of quality assurance before coding assurance before coding

作者:张红延 88

Page 9: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity Action/Action/ TaskTask Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive ObjectsProcess is sequence of activities (with logic Process is sequence of activities (with logic

branch ) ,which response to or triggered by branch ) ,which response to or triggered by eventevent

4 abstract Levels from 4 views4 abstract Levels from 4 views Functional Scope (Event—Response)Functional Scope (Event—Response) Business Process (Policy, Procedure & Business Process (Policy, Procedure &

Workflow) Workflow) Software Specification---Interactive Software Specification---Interactive

process between actors & systems with process between actors & systems with response to system eventresponse to system event

Task----Supported or automated by Task----Supported or automated by application program represented with application program represented with software process----data flowsoftware process----data flow

过程由事件所触发过程由事件所触发 99

Page 10: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

Activity is a concept on business Activity is a concept on business level, which is a unit or cell level, which is a unit or cell compositing Process and specified in compositing Process and specified in procedure of step –by-step actions procedure of step –by-step actions

On : Activity is an independent, On : Activity is an independent, meaningful logic piece of business meaningful logic piece of business process with the goal to complete the process with the goal to complete the specific task and to submit work products, specific task and to submit work products, it is a sequence of cell piece –actions and it is a sequence of cell piece –actions and can be done by a person or a computer. can be done by a person or a computer. It is not atomic calculations.It is not atomic calculations.

Activity is supported by system Activity is supported by system function( use case on system level) and function( use case on system level) and correspond to use case on business levelcorrespond to use case on business level

Activity is done by business roleActivity is done by business role 1010

Page 11: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

动作是活动中动作是活动中不可再分不可再分的操作的操作-原子计算,在某个特定状态-原子计算,在某个特定状态中事物中事物 // 对象会执行动作对象会执行动作 // 方方法,动作的执行也许会引起事法,动作的执行也许会引起事物或对象状态的变化物或对象状态的变化

动作是通过修改对象的属性而动作是通过修改对象的属性而达到改变事物达到改变事物 // 对象状态的目对象状态的目的的

动作被模型化为事物的动作动作被模型化为事物的动作或或 / / 对象的方法。通过对象的方法。通过 DFDDFD 或或流程图建模流程图建模

1111

Page 12: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

事物是业务层的概念,是过程中涉及事物是业务层的概念,是过程中涉及到的资源、产品、组织单元和信息实到的资源、产品、组织单元和信息实体体

对象是系统层的概念,是系统功能实对象是系统层的概念,是系统功能实现参与交互的元素个体(含信息实现参与交互的元素个体(含信息实体)。对象具有结构、状态和行为体)。对象具有结构、状态和行为

具有永久存储要求的对象是系统信息具有永久存储要求的对象是系统信息实体定义的来源实体定义的来源

事物事物 // 对象对象 //// 实体都有结构。结构有两实体都有结构。结构有两种,宏观结构指元素之间的结构关系,种,宏观结构指元素之间的结构关系,微观结构为元素个体自身的内部结构。微观结构为元素个体自身的内部结构。两种结构都可以用类图、两种结构都可以用类图、 ERER 以及构件以及构件图建模刻画图建模刻画

1212

Page 13: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

事物结构反映了事物之间的相事物结构反映了事物之间的相互关系及其内在属性结构互关系及其内在属性结构

信息实体的组成及结构可以从信息实体的组成及结构可以从事物结构导出事物结构导出

对象对象 // 类的结构反映了它们之类的结构反映了它们之间的相互关系和内在结构,刻间的相互关系和内在结构,刻画了系统的静态组成结构画了系统的静态组成结构

1313

Page 14: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

系统事件将引发系统执行某个用例,系统事件将引发系统执行某个用例,通常称之为系统功能,它是系统功能通常称之为系统功能,它是系统功能性需求的某种规格。性需求的某种规格。

功能是系统对业务过程的支持,反映功能是系统对业务过程的支持,反映系统能够为业务过程提供的外部可见系统能够为业务过程提供的外部可见的服务的服务

功能一般用功能一般用 UseCaseUseCase 建模并刻画,着建模并刻画,着眼于描绘用户需要系统做什么以及如眼于描绘用户需要系统做什么以及如何使用系统,而不是如何实现系统)何使用系统,而不是如何实现系统)

功能本身是对信息实体的加工与处理功能本身是对信息实体的加工与处理过程,通过过程,通过 DFDDFD 来刻画。事物中的信来刻画。事物中的信息实体类是功能所处理的对象息实体类是功能所处理的对象

1414

Page 15: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

事件就是指在某个时刻瞬间发生的事情。分事件就是指在某个时刻瞬间发生的事情。分业务事件,系统事件和对象“事件”(又称业务事件,系统事件和对象“事件”(又称消息)。或分为外部事件和内部事件。消息)。或分为外部事件和内部事件。

业务事件触发了业务过程,系统事件触发了业务事件触发了业务过程,系统事件触发了系统用例,对象事件引起对象动作或调用对系统用例,对象事件引起对象动作或调用对象方法。象方法。

系统事件是来自系统外部的、要求系统执行系统事件是来自系统外部的、要求系统执行某项功能的请求。对象“事件”是对象间的某项功能的请求。对象“事件”是对象间的消息,引发对象执行相应动作消息,引发对象执行相应动作

事件会引发一个响应-用例事件会引发一个响应-用例 // 接口服务接口服务 // 方法,方法,从而改变系统 从而改变系统 / / 接口接口 // 对象的状态,对象的状态,

事件事件 // 消息具有同样的规格。消息具有同样的规格。 事件可通过事件可通过 STDSTD 、交互图以及事件-相应图、交互图以及事件-相应图

建模,用事件列表进行规格刻画建模,用事件列表进行规格刻画1515

Page 16: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

状态是事物 状态是事物 / / 对象生命周期中对象生命周期中一种稳定的情形,有事件触发一种稳定的情形,有事件触发(可能执行动作,也可能不执(可能执行动作,也可能不执行动作)而发生变化行动作)而发生变化

状态有不同的语境范围,分系状态有不同的语境范围,分系统状态、用例状态和对象状态统状态、用例状态和对象状态

状态可以嵌套子状态,用状态可以嵌套子状态,用 STDSTD建模刻画建模刻画

1616

Page 17: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

ProcessProcess ActivityActivity ActionAction / Task/ Task Thing/ObjectThing/Object StructureStructure FunctionFunction EventEvent StateState BehaviorBehavior

作者:张红延

Cognitive ObjectsCognitive Objects

行为反映了被观察对象与外界交行为反映了被观察对象与外界交互的动态过程或状态变迁。互的动态过程或状态变迁。

系统行为系统行为- - ActorActor 与系统之间的与系统之间的交互过程即交互过程即 UseCaseUseCase 脚本过程,脚本过程,可使用活动图可使用活动图 // 交互图交互图 /STD/STD 建建模表示模表示

元素行为元素行为-系统元素之间的交-系统元素之间的交互过程,描述了被观察元素对互过程,描述了被观察元素对消息的相应以及状态变迁的过消息的相应以及状态变迁的过程。用程。用 STDSTD 建模建模

行为与状态相关,它定义了事件 行为与状态相关,它定义了事件 / / 消息发生的顺序即控制流程消息发生的顺序即控制流程

1717

Page 18: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Business Modeling Aspects

Scope &Vision

Resource Process

Objective Rule

Goal of business modeling is to define these elements above and show their mutual relations & interactions

Role Event

Constrain

作者:张红延 1818

Page 19: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Business Modeling Views

Strategy Definition Conceptual Model Objective-Problem Model

Resource Model Information Model Organization Structure Model

Process Model( with swimming road) Assembly Model

Interactive Model State Model Active Model

BusinessScope/Vision

BusinessProcess View

BusinessResource View

BusinessUseCase View

BusinessBehavior View

UseCase Model作者:张红延 1919

Page 20: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

System Modeling Aspects

作者:张红延

System Modeling AspectsSystem Modeling Aspects

SystemSystem

FunctionFunction StructureStructure

BehaviorBehavior

2020

Page 21: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

System Modeling View

Function View

Use Case Model

Process Decomposition Model

DFD

Business logic/Rule Statement

Behavior ViewSequential Diagram

Interactive Diagram

STD

Active Diagram(All above on System

Level)

Structure View Architecture

Data StructureLogical Structure Config. Structure

Deployment Structure

LogicalArchitecture

physicalArchitecture

作者:张红延 2121

Page 22: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Concern Model of System Reqt. Capture

作者:张红延

System AnalysisConcern

Analysis Concern of Functional Requirement

Analysis Concern of Nonfunctional Requirement

Data:Entity/Object

& Relationship

System Event& Message

Action/Function:Data Flow

PerformanceRequirements

UsabilityRequirements

Operational Requirements

Cultural & Political

Requirements

Legal Requirements

Look and FeelRequirements

StateTransition

Behavior

Maintainability&Portability

Requirements

Safety & Security

Requirements

Value Range

Throughput

Volume

ResultAccuracy

OperatorSafety

Speed to complete

task Availability

Resource Usage

EfficiencyReliability

Expandability

Operating Environment

User Condition

Portable Product

Collaboration System

InteractiveBehavior

Concern Model of System Requirement CaptureConcern Model of System Requirement Capture2222

Page 23: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

System Architecture Modeling View

Lo

gi

c

Ph

ysic

al

DesignView

Logical Structure Interface Collaboration

ConcurrentView

ThreadProcess

DeploymentView

Topological Structure Deployment Structure

ComponentView

Composition StructureConfiguration Structure

Use CaseView

Function

作者:张红延 2323

Page 24: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Object Modeling Aspects

作者:张红延

Object Modeling AspectsObject Modeling Aspects

ObjectObject

ActionAction/Method/Method FeatureFeature/Data/Data

BehaviorBehavior

2424

Page 25: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Object Modeling Views

Featu

re

Actio

nState

Data View

ER Model

Function View

DFD + DD + IPO

Behavior ViewSTD Model

Interactive Model

Object View

作者:张红延 2525

Page 26: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

模型驱动的软件开发一般过程

作者:张红延

业务领域建模业务领域建模

系统建模系统建模

逻辑架构建模逻辑架构建模

组件结构建模组件结构建模

处理过程描述处理过程描述

物理架构建模物理架构建模

业务层业务层

系统层系统层

实施层实施层

概要设概要设计层计层

详细设详细设计层计层

2626

Page 27: 第1章 系统分析与设计技术 第1部分 1.3认知对象及其建模视角

Thanks

2727作者:张红延