当前位置:文档之家› 企业应用系统架构与设计模式

企业应用系统架构与设计模式



Coding template

Reusable Components
跨越鴻溝的橋樑 Architecture, Design and Process
Object Oriented/Component/Framework/Platform Corner stone
大綱

前言 企業應用系統架構與MVC設計模式介紹 使用者介面設計模式 商業元件設計模式 資料元件設計模式與最佳實務
Return result
Access
View
Render
Data
Model
大綱

前言 企业应用系统架构介绍 设计使用者接口组件与设计模式 设计商业组件与设计模式 设计数据存取组件与设计模式
設計使用者介面元件

Application Architecture is the most important design pattern.
Data Format & exchange
Communication
Security
Cachinurces
Services
規劃 Business Objects 的功能


从需求分析规划系统功能,并指派功能给适当的 商业组件
設計 Business Entity

設計 DataSet

CartDS CategoryDS ProductDS CustomerDS
設計Business Rule Component
Service interface設計模式




Façade design pattern 目标:子系统提供单一接口给客户端 问题:子系统内的class分别提供部分功能,客户端必须 呼叫个别的class,致使两层间连结复杂,不易维护,违 反Encapsulation原则 效果:简化设计,易于维护

Thanks To Microsoft and Other Vendors MicroTrend Domain Know-how Process Patterns

全球化产业分工


Know-How的累积与自动化


Architecture patterns Design patterns
設計商業元件

Application Architecture is the most important design pattern.
Users
Patterns & Practices
UI Components Operational Management UI Process Components Service Interfaces Business Workflows Data Access Components Business Components Business Entities
Facade
Façade layer & Client Agent
UI Components
Agent
Façade layer
UI Process Components Service Interfaces
UIP Application Block
设计 Views 与 Navigation flow
Catalog
Add to Cart
Checkout
设定 Navigation flow
<navigationGraph iViewManager="WinFormViewManager" name="Shopping" state="State" statePersist="SqlServerPersistState" startView="cart" >
UIP 設計模型
Business entity - DataSet
Configuration File
Navigation

當Initialize controller時設定Navigate() handler
設計 Controller

Controller 协调 Views,BO,DO 与 UIP Framework
Users
Patterns & Practices
UI Components Operational Management UI Process Components Service Interfaces Business Workflows Data Access Components Business Components Business Entities
Client agent設計模式

統一Windows/Web Form存取Business components的服務介面 Isolate presentation layer from service changes
agent
大綱

前言 企业应用系统架构介绍 设计使用者接口组件与设计模式 设计商业组件与设计模式 设计数据存取组件与设计模式
Data Format & exchange
Communication
Security
Caching
Service Agents
Data Sources
Services
應用系統架構





UI Components:操作模式、数据安排、美观 User Process Components:业务操作流程 Service Interfaces:亦称为Façade Layer Business Components:运算逻辑 Business Entities:负责数据储存的组件 Business workflows:跨系统服务的流程整合 Data Access logic Components:存取数据库 Service Agents:呼叫其它系统服务
建立程式架構
VS .NET Solution
MVC Design Paradigm


问题: 传统的程序混合画面、画面流程、商业逻辑、 与数据库存取等功能,违反模块化设计原则 解决方案: Model: 数据与商业逻辑 View: 展现资料的画面 Controller: 接受 user request, 呼叫适当的 Model 执行工作,然后显示展现结果的画面 结果 模块分工明确 成为 design 的基本原则 应用广泛,例如增加 Data access 组件分离 Business object 与数据存取
功能需求 登入 浏览产品目录 加入物品至购物车, 数量固定为1 检视购物车内容 Check out order 显示checkout结 果 非功能性需求 对密码加密
Business Entity的型式



DataReader:具有最快的读取速度,用于 Forward-ReadOnly的场合,不具有OO概 念 Generic DataSet:On-Memory database Typed DataSet:兼具有Generic DataSet 的优点与对象导向程序设计的优点,多一些 overhead XML:可于执行查询直接传回XmlReader, 或由DataSet做数据转换 Business entity class:最符合对象导向 程序概念,程序逻辑简单,但数据转型的 overhead最大。处理大量或复杂的related entities时,必须小心处理以满足效能要求

對人力的需求龐大

挑戰


时间有限 Do More 经费有限 系统需求复杂 技术复杂 环境变化迅速 使用者心意不定 人力有限(数量与质量)
With Less
威脅

全球化软件产业分工


全体软件开发工程师 800万人 美国 印度 中国大陆
趨勢

硬件与通讯速度提升,价格下跌 功能强大的软件平台日益普及
Microsoft .NET 企业应用系统架构与设计模式
林耀珍 技术总监 第三波信息 Microsoft .NET 技術代言人
林耀珍
经历 第三波信息 技术总监 育碁数字科技 总经理 专业认证与专长 微软 .NET 技术 软件开发流程,信息系统规划 Microsoft MCSD/MCSE/MCDBA 对象导向技术,Rational OOAD 认证讲师 Lotus Notes principle CLP/CLI J2EE
Data Format & exchange
Communication
Security
Caching
Service Agents
Data Sources
Services
Front Controller設計模式


适用于复杂的网站设计 允许动态设定 View, Navigation flow, Controller 优点 高度模块化,大幅降低重复的程序代码 集中 Business logic 与 Data access 适合对 Controller, BO, DO 做单元测试 可协调 multiple view 串联互动 弹性应用 Logical view 与 Physical view 缺点 复杂 动态产生对象损失效能,Cache可降低痛苦
MVC 設計原則



Model: 数据与商业逻辑 View: 展现资料的画面 Controller: 接受 user request, 呼叫适当的 Model 执行工作,然后显示展现结果的画面
相关主题