第05讲 从需求到设计.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第05讲 从需求到设计

细化迭代1-架构设计、交互图和类图 从需求到设计 以迭代方式做正确的事,正确地做事 需求和对象分析在于理解系统的重要目标,以及相关的规则与约束。 接下来的设计工作则是设计解决方案以满足本次迭代的需求。 逻辑架构和层 The logical architecture is the large-scale(宏观) organization of the software classes into packages (or namespaces), subsystems, and layers. 为什么叫logical architecture A layer is a very coarse-grained grouping(细粒度分组) of classes, packages, or subsystems that has cohesive(内聚的) responsibility for a major aspect of the system. 严格的分层架构(网络协议栈采用) 宽松的分层架构(一般信息系统采用) 案例中关注的层(Domain) UML包图 用于描述系统的逻辑架构 比Java包或.Net命名空间更通用 包名的表示 依赖 使用层进行设计 使用层的本质思想 Organize the large-scale logical structure of a system into discrete layers of distinct, related responsibilities, with a clean, cohesive separation of concerns such that the lower layers are low-level and general services, and the higher layers are more application specific. Collaboration and coupling is from higher to lower layers; lower-to-higher layer coupling is avoided. 使用层进行设计 使用层的好处 Related complexity is encapsulated and decomposable. Some layers can be replaced with new implementations. Lower layers contain reusable functions. Some layers (primarily the Domain and Technical Services) can be distributed. Development by teams is aided because of the logical segmentation. 准则:内聚职责;使关系分离 使用层进行设计 代码映射为层和包 使用层进行设计 领域层与应用逻辑层;领域对象 如何使用对象设计应用逻辑 全能类XYZ,赋予其所有应用逻辑 创建软件对象,使其命名类似于真实世界,并赋于相应的应用逻辑 使用层进行设计 不要将外部资源表示为最底层 模型-视图分离原则 不要将非UI对象直接与UI对象连接或耦合 不要在UI对象方法中加入应用逻辑 迈向对象设计 如何设计对象 编码 绘图,然后编码 只绘图,不编码 敏捷建模和轻量级UML图 UML CASE工具 编码前绘制UML需要多少时间 迈向对象设计 静态与动态建模 UML交互图 顺序图 UML交互图 通信图(协作图) * IntellAgile IntellAgile 主讲:叶荣华 Copyright ? 2002 Craig Larman. All rights reserved. 逻辑构架与UML包图 常用的三层结构示例 逆向工程产生包图 使用层进行设计 领域层和领域模型的关系 Domain ( s ) Technical Services Foundation MySQL Inventory Persistence Naming and Directory Services Web AppFramework Technical Services POS Inventory Domain ( s ) Foundation Worse mixes logical and deployment views Better a logical view a logical representation of the need for data or services related to these subdomains

文档评论(0)

dajuhyy + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档