面向对象软件方法学_第1页
面向对象软件方法学_第2页
面向对象软件方法学_第3页
面向对象软件方法学_第4页
面向对象软件方法学_第5页
已阅读5页,还剩47页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、南开大学软件学院1面向对象软件方法学主讲:李兴娟E-mail:第一章 绪论课程目标n Apply an iterative, use case-driven, architecture-centric process (Unified Process) to the development of a robust design modeln Use the Unified Modeling Language (UML) to represent the design modeln Apply Object-Oriented (OO) concepts: abstraction, encapsu

2、lation, inheritance, hierarchy and polymorphism to the development of a robust design modeln Apply appropriate design patterns to optimize your design model南开大学软件学院2课程内容n Rational Unified Processn Design Object-Oriented Software (OOA/OOD)n Unified Modeling Languagen Rational Rose and other case tool

3、sn Design Patternsn A little Java南开大学软件学院3成绩评定n Attendance 10%n Homework & Exercises 30%n Exam 60%南开大学软件学院4教材与参考书n Mark Priestley, Practical object-oriented design with UML (面向对象设计的UML实践), Originally published: McGraw-Hilln Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, Design Patt

4、erns: Elements of Reusable Object-Oriented Software, 机械工业出版社.n Craig Larman,姚淑珍,李虎等译,UML和模式应用:面向对象分析与设计导论, (Applying UML and Patterns: An introduction to Object-Oriented Analysis and Design),机械工业出版社n 其他,Head Fist Design Patternsn 南开大学软件学院5本章内容n Explain concepts of Software developmentn Present the R

5、ational Unified Process (RUP) n Introduce UMLn Clarify OOA/OOD jargons南开大学软件学院7软件的开发nApplication software systems development is based on user needs。nthe ideal goals:shortest time, lowest cost, best performancenMethods & processes:systems analysis, design, implementation, test engineering nMaint

6、enance of the system process often takes more energy and costs. Therefore, the application systems development is a complex process 软件开发过程中的问题症状n User or business needs not metn Requirements not addressedn Modules not integratingn Difficulties with maintenancen Late discovery of flawsn Poor quality

7、of end-user experiencen Poor performance under loadn Build-and-release issues南开大学软件学院9开发方法学MethodologiesLanguageProcessModelsNotations11 软件工程11Symptomsend-user needschanging requirementsmodules dont fithard to maintainlate discoverypoor qualitypoor performancecolliding developers build-and-releaseRo

8、ot Causesinsufficient requirementsambiguous communicationsbrittle architectures overwhelming complexityundetected inconsistencies poor testingsubjective assessmentwaterfall development uncontrolled changeinsufficient automationBest Practicesdevelop iteratively manage requirementsuse component archit

9、ecturesmodel the software visuallyverify qualitycontrol changes症状的根源南开大学软件学院软件工程的最佳实践南开大学软件学院软件工程的最佳实践最佳实践:1迭代开发n Developing iteratively is a technique that is used to deliver the functionality of a system in a successive series of releases of increasing completeness. n Each release is developed in

10、a specific, fixed time period called an iteration.n Each iteration is focused on defining, analyzing, designing, building, and testing a set of requirements.瀑布开发的特点n Delays confirmation of critical risk resolution n Delays and aggregates integration and testingn Precludes early deploymentn Frequentl

11、y results in major unplanned iterations南开大学软件学院16迭代的利用瀑布模型扩充系统n Earliest iterations address greatest risksn Each iteration produces an executable release, an additional increment of the systemn Each iteration includes integration and testTCDRT I M EIteration 1 Iteration 2 Iteration 3 TCDRTCDR南开大学软件学

12、院迭代开发PlanningRequirementsAnalysis & DesignImplementationDeploymentTestEvaluationManagementEnvironmentEach iteration results in an executable release.Waterfall RiskIterative Risk风险控制对比20All Together: RUPtimecontentIn an iteration, you walk through all disciplines.统一过程(United Process)n里程碑(里程碑(mile

13、stonesmilestones)每个目标里程碑都是一个商业上的决策点,先启阶段结束之后,我们就要决定这个项目是否可行、是否要继续做这个项目。每一个阶段都是由里程碑来决定的,判断一个阶段是否结束的标志就是看项目当前的状态是否满足里碑中所规定的条件。统一过程(United Process)n资源分配资源分配n 项目的先启阶段投入少量的资源,对项目的开发前景和商业可行性进行探索性的研究。n 在精化阶段投入多一些的研发力量来实现一些与架构相关的核心需求。n以上两个阶段完成后,整个团队进行全面的系统开发。n 等到产品化阶段,开发资源可以随之而减少。InceptionElaborationConstru

14、ctionTransition时间时间资源资源统一过程(Unified Process)n进度与工作量关系IBM技术白皮书统一过程:迭代策略n 增量式增量式(Incremental)(Incremental):项目架构的风险较小,精化阶段只需要一个迭代。构建阶段需要有多次迭代来实现,每次迭代都在上一次的基础上增加一部分系统功能。n演进式演进式(Evolutionary)(Evolutionary):项目架构的风险较大,需要在精化阶段通过多次迭代来建立系统的架构,逐步演化而来。当架构建立时,往往系统的功能也已经基本实现。n增量提交增量提交(Incremental Delivery)(Increm

15、ental Delivery) :产品化阶段的迭代较多,业务需求不断发生变化,需要通过迭代来不断地部署完成系统,应用这种策略时要求系统架构非常稳定,能够适应满足后续需求变化的要求。先启精化构建产品化发布发布提交提交概念模型概念模型架构基线架构基线增量式增量式先启精化构建产品化发布发布提交提交概念模型概念模型架构基线架构基线演进式演进式增量提交增量提交先启精化构建产品化发布发布提交提交概念模型概念模型架构基线架构基线南开大学软件学院软件工程的最佳实践最佳实践:2管理需求n Analyze the Problemn Understand User Needsn Define the Systemn

16、 Manage Scopen Refine the System Definitionn Manage Changing Requirements南开大学软件学院软件工程的最佳实践最佳实践:3使用基于组件的架构n Architecture is a part of Design. It is about making decisions on how the system will be built. n But it is not all of the design. It stops at the major abstractions, the elements that have som

17、e pervasive and long-lasting effect on system performance and ability to evolve.南开大学软件学院29举例:基于组件的架构Key: - Purchased - Built - NewUser Interface MechanismsOracleVantiveCustomerProductLead TrackingUser InterfaceLicenseLicensing User Interface南开大学软件学院软件工程的最佳实践最佳实践:4可视化建模n Captures structure and behavi

18、orn Shows how system elements fit togethern Keeps design and implementation consistentn Hides or exposes details as appropriate n Promotes unambiguous communicationThe UML provides one language for all practitionersUML?n The Unified Modeling Language (UML) is a language fornSpecifyingnVisualizingnCo

19、nstructingnDocumentingthe artifacts of a software-intensive system模型视图DeploymentDiagramsuse-caseDiagramsScenarioDiagramsScenarioDiagramsSequenceDiagramsStateDiagramsStateDiagramsStateDiagramsComponentDiagramsComponentDiagramsComponentDiagramsModelsStateDiagramsStateDiagramsObjectDiagramsScenarioDiag

20、ramsScenarioDiagramsCollaborationDiagramsActivityDiagramsStateDiagramsStateDiagramsClassDiagrams使用UML图表可视化建模Actor Ause-case 1use-case 2Actor B user : mainWnd : MainWndfileMgr : FileMgrrepository : Repositorydocument : DocumentgFile : GrpFile9: sortByName ( )L1: Doc view request ( )2: fetchDoc( )5: r

21、eadDoc ( )7: readFile ( )3: create ( )6: fillDocument ( )4: create ( )8: fillFile ( )UIMFCRogueWaveglobalDocumentAppPersistence Window95- .EXE WindowsNT- .EXEWindowsNT Windows95Solaris-.EXE AlphaUNIX IBM Mainframe-Windows95- - 95 : - NT: - - : - -, - - IBM : -, -DocumentFileManagerGraphicFileFileRep

22、ositoryDocumentListFileListusermainWndfileMgr : FileMgrrepositorydocument : DocumentgFile1: Doc view request ( )2: fetchDoc( )3: create ( )4: create ( )5: readDoc ( )6: fillDocument ( )7: readFile ( )8: fillFile ( )9: sortByName ( )- .- - - .- - .Customernameaddrwithdraw()fetch()send()receive()Forwa

23、rd Engineering (Code Generation)and Reverse EngineeringExecutable SystemUser InterfaceDefinitionDomain ExpertOpenningWritingReadingClosingadd file numberOffile=MAX / flag OFFadd fileclose fileclose fileuse-case 3Source Code edit, compile, debug, linkUse-Case DiagramClass DiagramCollaboration Diagram

24、Sequence DiagramComponent DiagramState DiagramPackage DiagramDeployment DiagramClass可视化建模解决的问题use-cases and scenarios unambiguously specify behaviorModels capture software designs unambiguously Non-modular or inflexible architectures are exposedUnnecessary detail hidden when appropriateUnambiguous d

25、esigns reveal inconsistencies more readilyApplication quality starts with good designVisual modeling tools provide support for UML modeling Insufficient requirements Ambiguous communications Brittle architectures Overwhelming complexity Subjective assessment Undetected inconsistencies Poor testing W

26、aterfall development Uncontrolled change Insufficient automation南开大学软件学院软件工程的最佳实践迭代开发中的连续测试T I M ETestTestTestTCDRIteration 1 Iteration 2 Iteration 3 TCDRTCDRTest Life CycleEvaluatePlanDesignImplementExecuteEvaluatePlanDesignImplementExecuteEvaluatePlanDesignImplementExecute 最佳实践:6控制改变n控制改变支持所有其他的最佳

27、实践本课程侧重:Analysis / DesignAnalysisDesignWhatRequirementsInvestigation of DomainHowLogical solution分析模型与设计模型n Analysis models design modelsn What if different languages are used for the two phases? Information can not be accurately translated.n OO technology: use the same kinds of models in the two ph

28、ases.The analysis models will be preserved and recognized in the design phase.Design phase: just adding some details.Thus, the course only covers the design phase.UML:Unified Modeling Language Invented by “The Three Amigos”Grady Booch (The Booch method) James Rumbaugh (OMT)Ivar Jacobson (OOSE)UML is

29、 not a methodology - it is a universal visual modeling language. It was designed to incorporate current best practice in modeling techniques and software engineering.UML的目标n Model systems using OO conceptsn Establish an explicit coupling to conceptual as well as executable artifactsn To create a mod

30、eling language usable by both humans and machinesn Models different types of systems (informationsystems, technical systems, embedded systems, real-time systems, distributed systems, system software, business systems, UML itself, .)Taken from http:/ias.uni-klu.ac.at/projects/uml/OTG99/sld006.htmRumb

31、augh Jacobson2.0基本术语n Models: An abstract view of a complete system.n Model elements: The atoms out of which models are built. Things like classes, operations and relationships are model elements in UML.n Diagrams: A graphical presentation of some or all of the information in a model.UML视图n Each view is a projection of the complete systemn Each view highlights particular aspects of the systemn Views are described by a number of diagrams.n No strict separation, so a diagram can be part o

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论