Original: http://www.cnblogs.com/way-peng/archive/2012/06/11/2544932.html
First, what is UML? What's the use of UML?
Ii. History of UML
Third, the upper structure of UML (superstructure)
Iv. UML Modeling Tools
V. Diagram of UML (emphasis)
1. Case diagram (use cases diagram)
2. Activity diagram (Activities diagram)
3. Static structure diagram
4. Sequence diagram (Sequence Diagram)
5. Interactive overview diagram (Interaction overview Diagram)
6. Communication diagram (communication Diagram)
7. Time Chart (Timing Diagram)
8. Status machine diagram (state machines Diagram)
9. Component Diagram (Component Diagram)
10. Deployment diagram (Deployment Diagram)
First, what is UML? What's the use of UML?
What is UML?
Unified Modeling Language (Unified Modeling Language) is a common, visual modeling language standard developed by the Object Management Organization (OMG), which can be used to visualize (visualize), describe (specify), Constructs (construct) and documents (document) software-intensive systems of various artifacts (artifacts, also translated products)
UML is a standard graphical modeling language and a standard representation of object-oriented analysis and design, which:
Not a visual programming language, but a visual Modeling Language (for analysis design)
is not a specification of a tool or knowledge base, but rather a modeling language specification, a standard for presentation
is not a process, nor a method, but allows any process and method to use it
What's the use of UML?
When the scale of software development system is more complex, it needs to express complex concept with graph abstraction, enhance the flexibility, readability and comprehension of design, so as to expose deep-seated design problems and reduce development risk. It is necessary to use a set of common graphics language and symbology to describe the business process and software requirements of the Organization, and to promote the consistent and efficient communication between business people and developers.
Ii. History of UML
UML Development background:
P. Coad and E.yourdon proposed OOA and Ood
G. Booch proposes an object-oriented development approach
Jacobson proposed oose
The OMT proposed by Rumbaugh
......
The advent of UML ended the war of the square law
UML Development History:
Third, the upper structure of UML (superstructure)
As for the underlying infrastructure of UML (Infrastructure), software development engineers do not need to understand, only need to understand the upper structure of the line.
construction block (building blocks) /td> |
general mechanism (common mechanisms) |
frame (architecture) |
Things (things) structure, behavior, grouping, comment Relationship (relationships Dependency, association, generalization, implementation Diagram (diagram) static (7 kinds): Class diagram, object graph, Component diagram, deployment diagram, Package diagrams, combo chart, Outline map dynamic (7 kinds): Sequence diagram, communication diagram, time chart, interaction overview, activity diagram, state machine diagram, use case diagram |
Specification (specifications) Model description of the Text dimension Adornment (adornments) Describes the details of the modeling element General Division (Common divisions) How to divide things when modeling Extension mechanism (extensibility mechanisms) Stereotype, constraint, Tag value |
4+1 view The views in UML include the use Case view, the logical view (Logical view), the implementation view (Implementation view), the processes view (process view), the deployment view (Deployment view), and so on. These 5 views are called "4+1" views. |
Iv. UML Modeling Tools
The more popular are rational Rose, Microsoft Visio, Enterprise Architect, Visual UML, and so on. I now use the UML modeling tool is Enterprise Architect 8.0, recommended to use this, more useful.
V. Diagram of UML (emphasis)
1. Case diagram (use cases diagram)
Case diagrams (use cases Diagram) are model diagrams of system functions that are observed by external users known as actors (actors) List the use cases and contributors in the system Shows which participant participated in which use case was executed Core Concepts Use case: A functional unit in a system that can be described as an interaction between the participant and the system Participant, participant generalization Relationship between use cases and participants: associations Relationship between use cases: extending, including, generalizing Recommended Use occasions Business modeling, requirements acquisition, definition A Library Management system: is a Web-based computer application system; Readers can query the book information and borrowing information; Readers can book the required books through the system; Library staff use the system to complete the reader's borrowing, return business; Library staff can maintain the information of books and readers; For expired books, the system will automatically send the message to the reader; The administrator will maintain the system regularly; ...... |
UC01: "Borrowing" use case documentation use case name: borrowing books use case ID: UC01 participants involved: staff The use cases involved: None Description: A worker uses this use case to complete the borrowing process for readers Preconditions : workers must log on to the current system Stakeholder Benefits: Reader: Easy to find and lend the books you need Staff: Able to complete the library work quickly and accurately Basic Event Flow: workers help readers borrow books 1. Use cases starting from the reader with the books to borrow to borrow the front desk; 2. Staff input reader information; 3. The staff input all the book information: * 3.1 Staff input a book information; * 3.2 system confirms that the reader can borrow the current book; 4. Staff members confirm the lending information; 5. The system records this lending situation. Post Condition: the system correctly records readers ' borrowing information into the database Alternate event Stream 2a. The identity of the reader is not legal 2b. Readers are not allowed to borrow books due to lack of information 3.2a. The reader is not allowed to borrow the current book Field List: 5. Borrowing information mainly includes: Reader's library card number, book number, borrowing date (the default is the date of the day), the number of borrowing days and the return date. Business Rules 3.2 System According to the current reader's borrowing rules to determine whether to borrow books, and the borrowing rules depend on the type of readers (such as undergraduates, postgraduates, teachers, etc.) and the type of books (such as Science and technology, literature, new books, etc.), and can be dynamically configured Non-functional requirements: None design constraints: None deployment constraints: None Unresolved issues 2b. How many overdue records do readers have before they are allowed to borrow books? 3.2 The specific configuration of the lending rules should be discussed with the user? |
2. Activity diagram (Activities diagram)
Activity Map (Active Diagram) To organize by actions, primarily to describe the internal behavior of a method, mechanism, or use case Core Concepts Status, activity, combined activity, object Transfer, branching concurrency, synchronization Lane Recommended Use occasions Business modeling, requirements, class design |
|
3. Static structure diagram
Class diagram (class Diagram) |
Is the blueprint of the software, detailing the related classes of the objects within the system, and the static relationships between those classes. Core concepts: Class, interface, dependency, association, generalization, implementation Class diagrams show the static relationships of entity classes: |
|
Object Graph (Diagram) |
Represents the static structure and behavior of an object at a time class. Core concepts: Object, link, multiplicity Object graph shows my current borrowing situation: |
|
Package diagrams (Package Diagram) |
Show the organizational units (packages) that are decomposed by the model itself and their dependencies. Core Concepts: Packages (, frameworks, tiers, subsystems), dependencies Package diagrams Display System hierarchy: |
|
Composite structure diagram (Composite Structure Diagram) |
Describes the internal structure of a part (composite structure) in a system, including the point of interaction between the part and other parts of the system.
Core concepts: Composite structure, components, ports, protocols The combo chart shows the internal structure of the library: |
|
4. Sequence diagram (Sequence Diagram)
Sequence diagram (Sequence Diagram) Used to display interactive activities between objects Focus on the chronological order of message delivery between objects Core Concepts object, lifeline, activation, interaction, message Interactive frames (Interaction frame) Recommended Use occasions Use case analysis, use case design |
Sequence diagram of the "borrowing" use case implementation |
5. Interactive overview diagram (Interaction overview Diagram)
Interactive overview diagram (Interaction overview Diagram) Mixture of activity diagrams and sequence diagrams Intuitively express the flow logic between a set of related sequence diagrams Core Concepts Interactive Frames Branch, transfer Recommended Use occasions Use case analysis, use case design |
Interactive overview diagrams organize multiple sequence diagrams |
6. Communication diagram (communication Diagram)
Communication diagram (communication Diagram) UML 1.x called collaboration Diagram (collaboration Diagram) Represents a set of inter-object relationships and interactive activities Core Concepts objects, collaboration roles Collaboration, interaction, messaging Recommended Use occasions Use case analysis, use case design |
Communication diagram of "borrowing" use case implementation
|
7. Time Chart (Timing Diagram)
Time Chart (Timing Diagram) An interaction diagram that shows the actual time information of a message spanning different objects or roles; Specify the point in time at which the state of a single or multiple objects changes and the time period in which a particular state is maintained; Sequence diagrams are the primary means of representing interactions, and you can add time constraints in a sequence diagram to indicate the point in time at which an object's state changes and the time period in which a particular state is maintained. Core Concepts Time constraints, duration constraints, lifelines Status, condition, event |
Time constraints for the "call" sequence diagram
Describing time constraints with time graphs
|
8. Status machine diagram (state machines Diagram)
Status machine diagram (state machines Diagram) uml1.x as state diagram (Statechart Diagram) Using states and events to describe the behavior of the object itself Key Concepts State, initial state, final state, compound state Events, transitions, actions Concurrent Recommended Use occasions Class design |
State machine Diagram of the "book" Class
|
9. Component Diagram (Component Diagram)
Component Diagram (Component Diagram) Encapsulation class is a component Describe the relationship between software artifacts and the system implementation environment Key Concepts components, artifacts, interfaces (interfaces provided, required interfaces) Dependency, implementation Recommended Use occasions System design, implementation, deployment |
Implementation environment of Component diagram Description class
|
10. Deployment diagram (Deployment Diagram)
Deployment diagram (Deployment Diagram) Describe the physical deployment of hardware artifacts required by the system Key Concepts node, component, location Connect, rely on Recommended Use occasions System design, implementation, deployment |
Deployment diagram describes the deployment of the system
|
Diagram of UML modeling