- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
8_Intro_to_UML
展开查看详情
1 .Intro to UML 1 Lecture 8: Introduction to UML Learning Goals Describe the purpose of the Unified Modelling Language (UML) Argue why modelling is important in System Software Engineering List several types of diagrams , and give a short description of their purpose Outline instances where and how UML is used in practice © Paul Davies, C. Antonio Sanchez. Not to be copied, used, or revised without explicit written permission from the copyright owner.
2 .UML: Unified Modelling Language Intro to UML 2 UML is a general modelling language in software engineering to provide a standard way to visualize the design of a system. Its main purpose is to help communicate and plan out structure behaviour interactions in a software system. This becomes essential when working on large projects, and when working in a team where everyone needs to be on the same page.
3 .Why Model at All? Intro to UML 3 If you are hammering together a simple bookcase with a few pieces of wood and a handful of nails, you may not need to spend much time on design. Imagine building this one without a plan. The Leistler Bookcase took over a year to build, and was shown off at the Great Exhibition in London (1851) as a demonstration of the “wonders of industry”. By Gryffindor (Own work) [CC BY-SA 3.0]
4 .Why Model at All? Intro to UML 4 Software systems are becoming more and more complex . With the ubiquity of computers (smart phones, smart homes, smart clothing, automation), the desire for everything to be connected, and the incredible computing power available, more and more is being demanded of software engineers. Have you ever been faced with a complex problem and had to draw something out? How about when trying to explain something to a friend? Diagrams allow us to decompose complex systems into simpler abstract components and visualize them. This can help us understand and better communicate the “big picture” ideas behind a system, and give us a road-map for development.
5 .UML: Unified Modelling Language Intro to UML 5 Mathematicians use algebraic symbols to communicate, electrical engineers have circuit notation, software engineers have evolved their own notation for describing the architecture and behaviour of software systems. UML , the Unified Modelling Language , is that standardized language. It has syntax and semantics to convey meaning, allowing two people fluent in that language to communicate and understand the intention of the other. There are a set of 13 essentially graphical notations, supplemented by text, designed to capture requirements and design alternatives . You don’t always need all 13 diagrams; you choose the ones that capture important information about the system you are working on.
6 .Types of Diagrams Intro to UML 6 Use-Case Diagrams: document high-level functional requirements, and relationships with users and other systems (actors). These outline every observerable function your system must perform. Class Diagrams: outline the different entities in a system, and their relationships with each other. It shows the structural breakdown of the software. Sequence Diagrams: show the detailed flow of execution of events, and relative timings between them. These model the behaviour, the interactions between collaborating objects.
7 .Types of Diagrams Intro to UML 7 State Diagrams: outline the time-dependent changes in state and transitions of each major object or interaction in your system. Activity Diagrams: model high-level activities and transitions between system states, shows concurrency of activities. Deployment Diagrams: show where each of your software modules are deployed in the physical system and how they communicate. http://www.agilemodeling.com/essays/umlDiagrams.htm
8 .Use Case Diagram Intro to UML 8 Example Use-case Diagram for a student database Used for analyzing requirements , exploring user interactions. Documents: Who initiates an interaction What information enters the system What information comes out Measurable benefits to the user Requirements analysis uncovers functionality the system must provide to satisfy its users.
9 .Class Diagram Intro to UML 9 Example Class Diagram Relationship between objects/classes. Can be more abstract and design-centered, or specific and implementation-centered. Explores software architecture , functionality and relationships between objects in our system (i.e. instances of classes).
10 .Sequence Diagram Intro to UML 10 Example Sequence Diagram Model the interaction of collaborating objects using message passing as they attempt to achieve the functionality expressed in one or more use cases. This models the behaviour of the system in response to inputs from the external world.
11 .State Chart Diagram Intro to UML 11 State State Transition following an event Terminating State Starting State Model the time dependent behaviour of objects or systems in response to messages sent to it over a period of time.
12 .Activity Diagram Intro to UML 12 Show the procedural flow of control while processing an activity, modelling the logic in a use-case or use-case scenario. Green bars indicate creation and joining of parallel sections.
13 .Deployment Diagram Intro to UML 13 Show how complex software will be deployed (installed) across a distribution of computers and networks. Gives an indication of the kinds of runtime resources are required
14 .UML In Practice Intro to UML 14 Is UML and modelling actually used in practice? It depends… In military, security, and safety critical applications, a full detailed design with documentation is often required before you even start programming. Some firms insist on a formal UML approach. This can be useful when you want to generate code automatically (or using interns) from a model. This is known as Model-Driven Development (MDD) . Some clients/customers may insist on full documentation with formal UML. Many developers use UML informally , documenting enough ideas to allow the team to understand what and how things will work.
15 .Homework Intro to UML 15 Quiz 3 next week on mutexes, shared memory Download the updated course library and read/compile/run the examples in: examples/q7_mutex examples/q3_shared_memory https://www.ibm.com/developerworks/rational/library/6007.html Read: The Value of Modelling