Understanding Software Modeling and UML: An Overview

svvrl @ im ntu n.w
1 / 32
Embed
Share

Explore the history and significance of Unified Modeling Language (UML) in software development. Learn how UML helps in visualizing, specifying, constructing, and documenting object-oriented systems. Discover who UML is for and the basics of modeling. Dive into the importance of modeling in software development.

  • Software Modeling
  • UML
  • System Design
  • Modeling Basics
  • Object-Oriented

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. SVVRL @ IM.NTU Software Modeling and UML: An Overview (Based on [Booch et al. 2005]) Yih-Kuen Tsay Dept. of Information Management National Taiwan University SDM 2024

  2. SVVRL @ IM.NTU Outline Introduction Basics of Modeling Overview of the UML Sample UML Diagrams SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 2 / 32

  3. SVVRL @ IM.NTU Introduction: History of the UML The UML---Unified Modeling Language, is a standard graphical language for drawing a system s blueprints It was initially the result of an effort in unifying the Booch, OOSE, and OMT methods Most major software companies eventually got involved, resulting in UML 1.1 (1997) Its maintenance was then taken over by OMG Adoption of a major revision---UML 2.0 was completed in 2005, also an ISO standard Most recent version: UML 2.5.1 (December 2017) SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 3 / 32

  4. SVVRL @ IM.NTU Introduction: What the UML Is For For drawing a system s blueprints More specifically, for Visualizing Specifying Constructing Documenting object-oriented, software-intensive systems. (This corresponds to the four aims of modeling.) SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 4 / 32

  5. SVVRL @ IM.NTU Introduction: Whom the UML Is For Analysts and End Users: specify the (structural and behavioral) requirements Architects: design systems that meet the requirements Developers: turn the design into executable code Others: quality assurance personnel (e.g., testers), technical writers, librarians, project managers, All roles in software development should know something about the UML. SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 5 / 32

  6. SVVRL @ IM.NTU Basics of Modeling What is a model? simplification of reality blueprints of a system: structural or behavioral Why do we model? To visualize and communicate, to control, and therefore to better understand the system under development To focus on one aspect at a time (it is not possible to comprehend a complex system in its entirety, so divide and conquer ) SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 6 / 32

  7. SVVRL @ IM.NTU Importance of Modeling Mind the scale: dog house family house office building The use of modeling is a common thread of successful software projects In fact, modeling can be found in every discipline/profession SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 7 / 32

  8. SVVRL @ IM.NTU Four Aims of Modeling To visualize a system To specify its structure and/or behavior To provide a guiding template for construction To document the decisions made SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 8 / 32

  9. SVVRL @ IM.NTU More Tips Use a common language Do modeling now, before it is too late Things may get more complex than expected SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 9 / 32

  10. SVVRL @ IM.NTU Principles of Modeling Models influence the solutions (so, choose your models well) Different levels of precision may be expressed Good models are connected to reality No single model is sufficient; multiple models/views are needed SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 10 / 32

  11. SVVRL @ IM.NTU Five Views of Software Architecture Use case view: exposing the requirements, as seen by its end users, analysts, and testers Design view: capturing the vocabulary (classes, interfaces, etc.) of the problem/solution space Interaction view: flow of control and messages Implementation view: organization/management of software artifacts/modules Deployment view: mapping of runtime entities to the underlying platforms or computing nodes SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 11 / 32

  12. SVVRL @ IM.NTU Object-Oriented Modeling The main building blocks of all software systems are objects and classes An object is a thing drawn from the vocabulary of the problem/solution space Every object has an identity, a number of states, and behavior A class defines a set of common objects SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 12 / 32

  13. SVVRL @ IM.NTU Overview of the UML Things Relationships Diagrams SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 13 / 32

  14. SVVRL @ IM.NTU The UML in the Software Development Process The UML allows one to express different views of a system and their interactions The UML is largely process-independent The OMG recommends using the UML with the so- called Unified Software Development Process: Characteristics: (1) use case driven; (2) architecture-centric; (3) iterative and incremental (a series of executable releases; continuous integration) Four phases of a process: inception, elaboration, construction, transition SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 14 / 32

  15. SVVRL @ IM.NTU Things in the UML Structural Things Class, interface, collaboration, use case, active class, component, artifact, node Behavioral Things Interaction (messages, action sequences, links) State machine (states, transitions, events) Grouping Things: packages Annotational Things SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 15 / 32

  16. SVVRL @ IM.NTU Structural Things (I) name Class attributes Shape +origin : Point Objects are underlined Abstract elements are in italics +move(in p: Point) +resize(in s: Scale) +display() #invalidateRegion() signature visibility operations Responsibilities -- manage shape state -- handle basic shape transformations provided interface IApplication IApplication name extra compartment SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 16 / 32

  17. SVVRL @ IM.NTU Structural Things (II) Collaboration Use Case name name Place order Chain of responsibility Extra compartments may be used to show contents. SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 17 / 32

  18. SVVRL @ IM.NTU Structural Things (III) Active Class Component Node name name attributes name icon Server Server EventManager EventManager -q : EventQueue <<manifest>> <<artifact>> spelling.dll SpellChecker +suspend() +flush() operations Artifact Extra compartments may be used to show contents. SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 18 / 32

  19. SVVRL @ IM.NTU Behavioral Things (I) Interaction anonymous role name type role t:Thread : Toolkit sequence label a1 : run(3) lifeline run() callbackLoop() message creation call <<create>> p:Peer handleExpose() execution specification recursion return <<destory>> destructon SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 19 / 32

  20. SVVRL @ IM.NTU Behavioral Things (II) State Machine final state transition state off nested state onHook guard initial state Idle Working ready(3) [signalOK] keepAlive / check() Connecting Internal transition offHook / reclaimConnection() Connected event action SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 20 / 32

  21. SVVRL @ IM.NTU Grouping Things Package name Business rules Business rules Extra compartments may be used to show contents. SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 21 / 32

  22. SVVRL @ IM.NTU Annotational Things Note note Consider the use of the broker design pattern here. SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 22 / 32

  23. SVVRL @ IM.NTU Relationships in the UML Dependency Association Generalization Realization SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 23 / 32

  24. SVVRL @ IM.NTU Relationships name Owner Owner Dependency source target navigation name multiplicity Employs Employs 0..1 * Association end end employer employee end name (subclass) (superclass) Generalization child parent Note: direction of an association should now be indicated by a solid triangle following the association name. SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 24 / 32

  25. SVVRL @ IM.NTU Diagrams in the UML Graphical representations of things and relationships Structural and Architectural Diagrams: class diagrams, object diagrams, component diagrams, composite structure diagrams, deployment diagrams (including artifact diagrams), package diagrams Behavioral Diagrams: use case diagrams, interaction (sequence and communication) diagrams, state diagrams, activity diagrams, timing diagrams, interaction overview diagrams SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 25 / 32

  26. SVVRL @ IM.NTU Rules of the UML Well-formed models Self-consistent Following UML rules for names, scope, visibility, integrity, execution Not well-formed models Elided: some elements hidden Incomplete: some elements missing Inconsistent SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 26 / 32

  27. SVVRL @ IM.NTU Common Mechanisms in the UML Specifications: textual statements behind every graphical element Adornments unique notations for different elements/details Common divisions class vs. object, interface vs. implementation, role vs. type Extensibility mechanisms stereotypes, tagged values, constraints SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 27 / 32

  28. SVVRL @ IM.NTU Extensibility <<authored>> EventQueue <<authored>> version = 3.2 author = egb stereotype add() remove() flush() tagged value {ordered} constraint SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 28 / 32

  29. SVVRL @ IM.NTU Use Case Diagram Credit Card Validation System Credit Card Validation System Perform card transaction * * * * * * * * Retail institution Customer Process customer bill * * * * Reconcile transaction * * Individual customer Corporate customer * Manage customer account Sponsoring financial institution * Secondary actors Primary actors SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 29 / 32

  30. SVVRL @ IM.NTU Class Diagram class Company Company composition multiplicity 1..* 1..* * 1 1 name Office Office 0..1 Department Department Location -address : string -phone : int -name : Name string * * generalization association * * Headquarters Headquarters role constraint ContactInformation ContactInformation 1 -manager {subsets member} 1..* -member -address : String string Person Person attributes -name : string -employeeID : int -title : string providedi nterface PersonnelRecord PersonnelRecord operations -taxID -employmentHistory -salary +getPhoto() +getPhone() +getContactInformation() +getPersonalRecords() ISecureInformation dependency SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 30 / 32

  31. SVVRL @ IM.NTU Sequence Diagram objects c : Client p : ODBSProxy create() : Transaction synchronous message setActions(a, d, o) setValues(d, 3.4) time parameters setValues(a, "CO") (committed) lifeline execution specification destroy() object destruction return message asynchronous message SDM 2024: An Overview of Software Modeling and UML Yih-Kuen Tsay 31 / 32

  32. SVVRL @ IM.NTU Remarks The best way to learn the UML is by actually using it: Domain modeling Design patterns Term project In follow-up lectures, we will cover Basic structural and behavioral diagrams Some more advanced UML features The Object Constraint Language Things not covered in class are left for you to explore. Yih-Kuen Tsay SDM 2024: An Overview of Software Modeling and UML 32 / 32

More Related Content