Original article: http://www.cnblogs.com/way-peng/archive/2012/06/11/2544932.html
1. What is UML? What is the purpose of UML?
Ii. History of UML
Iii. UML superstructure)
Iv. UML modeling tools
V. UML diagram(Important)
1. use case diagram)
2. Activity digraphs)
3. static structure diagram
4. Sequence Diagram)
5. Interaction overview digoal)
6. Communication Diagram)
7. Timing digraphs)
8. State Machine digraphs)
9. Component Diagram)
10. Deployment Diagram)
1. What is UML? What is the purpose of UML?
What is UML?
Uniied Modeling Language (Unified Modeling Language) is developed by the Object Management Organization (OMG ).General,VisualizationOfModeling LanguageStandard, which can be usedVisualization(Visualize ),Description(Specify ),Structure(Construct) andDocized(Document) various artifacts of software-intensive systems (artifacts, also translated products)
UML is a standard graphical modeling language and is designed for Object-Oriented Analysis.Standard Representation, It:
It is not a visual programming language, but a visualModeling Language(For Analysis and Design)
It is not a Specification Description of a tool or knowledge base, but a Specification Description of a modeling language.Standard
It is neither a process nor a method, but any process or method is allowed.UseIt
What is the purpose of UML?
Software Development System scaleComplex scenariosIt is necessary to use graphical abstraction to express complex concepts, enhance design flexibility, readability, and comprehensibility, so as to expose deep Design Problems and reduce development risks. A setGeneralThe Graphic Language and symbol system describe the organization's business processes and software requirements, and promote consistent and efficient communication between business personnel and developers.
Ii. History of UML
UML development background:
P. Coad and E. Yourdon propose OOA and OOD
G. booch proposes an object-oriented development method.
Proposed by Jacob son oose
OMT proposed by Rumbaugh
......
The emergence of UML ended the methodology war.
UML development history:
Iii. UML superstructure)
As for the underlying infrastructure (infrastructure) of UML, it is not necessary for software development engineers to understand the structure of the upper layer.
building blocks |
common mechanisms |
architecture |
things) structure, behavior, group, comment relationships) dependency, association, generalization, and implementation diagram static (7 types ): class diagram, object diagram, component diagram, deployment diagram, package diagram, composite structure diagram, and external Profile Diagram dynamic (7 types ): sequence, communication, time, interaction, activity, state machine, and use case |
specifications) model description of text dimension modifier (adornments) describe the details of Modeling Elements common divisions) method of dividing things during modeling extensibility mechanic Ms) constructor, constraint, and tag value |
4 + 1 views the views in UML include the use case view and the logical view) the implementation view, process view, and deployment view are called "4 + 1" views. |
Iv. UML modeling tools
Popular include Rational Rose, Microsoft Visio, enterprise impact ect, and visual UML. The current UML modeling tool I use is enterprise architect 8.0. This is recommended for ease of use.
V. UML diagram(Important)
1. use case diagram)
Use Case divisor is a model map of system functions observed by external users called actors. List use cases and participants in the system Show which participant participates in the execution of which use case Core concepts Use Case: A function unit in the system, which can be described as an interaction between the participant and the system. Generalization of participants and participants Relationship between use cases and PARTICIPANTS: Association Relationships between use cases: extended, included, and generalized Recommended scenarios Business modeling, requirement acquisition, and definition A library management system: Is a Web-based computer application system; Readers can query book information and borrow information; Readers can reserve required books through the system; Library staff use the system to complete the borrowing and returning services of readers; Library staff can maintain Library Information and reader information; For expired books, the system will automatically send reminders to readers; The Administrator regularly performs system maintenance; ...... |
Uc01: "borrow books" Use Case document Case Name:Borrow Books Use Case ID:Uc01 Involved participants:Staff Use cases involved:None Description:The use case is used by the staff to complete the Book Borrowing Process for the reader. Prerequisites:Staff must log on to the current system Stakeholder benefits: Readers: can easily find and lend the required books Staff: quick and accurate Book Borrowing Basic event stream:Help Readers borrow books 1. the use case starts when the reader comes to the lending reception desk with the books he wants to borrow; 2. Personnel input reader information; 3. The staff enter all the books one by one: * 3.1 The staff enter the information of a book; * 3.2 The system confirms that the reader can borrow the current book; 4. The staff confirms the borrowing information; 5. The system records the current lending situation. Post condition:The system correctly records the reader's borrowing information to the database. Alternate event stream 2a. Invalid reader identity 2b. The reader is in arrears and cannot borrow books 3.2a. the reader is not allowed to borrow the current book. Field List: 5. The borrowing information mainly includes: the reader's book id, book number, borrowing date (the default date is the current day), borrowing days, and return date. Business Rules 3.2 The system determines whether books can be borrowed Based on the Borrowing Rules of current readers. The Borrowing Rules depend on the types of readers (such as undergraduates, graduate students, and teachers) and the types of books (such as science and technology, literature, and new books), and can be dynamically configured Non-functional requirements:None Design constraints:None Deployment constraints:None Unsolved Problems 2b. How many overdue bills does the reader not allow to borrow books? 3.2 How should I further discuss the configuration of lending rules with users? |
2. Activity digraphs)
Activity digraphs) Actions are organized to describe the internal behavior of a method, mechanism, or use case. Core concepts Status, activity, combined activity, Object Transfer, Branch Concurrency and Synchronization Swimming Lane Recommended scenarios Business modeling, requirements, and Class Design |
|
3. static structure
Class digraphs) |
It is a software blueprint that describes in detail the classes related to objects in the system and the static relationships between these classes. Core concepts: Class, interface, dependency, association, generalization, and implementation The class diagram shows the static relationship of the object class: |
|
Object digraphs) |
Static structure and behavior of objects in a class at a certain time point. Core concepts: object, link, and multiple The object graph shows my current borrowing status: |
|
Package digraphs) |
Shows the organizational units (packages) that are decomposed by models and their dependencies. Core concepts: Package (, framework, layer, subsystem), dependency The package diagram shows the hierarchical structure of the system: |
|
Composite Structure Divisor) |
Describes the internal structure of a part (combination structure) of the system, including the interaction points between this part and other parts of the system. Core concepts: Combination Structure, parts, ports, protocols The composite structure diagram shows the internal structure of the borrowed books: |
|
4. Sequence Diagram)
Sequence digraphs) Used to display interaction activities between objects Focus on the time sequence of message transmission between objects Core concepts Object, lifeline, activation, interaction, message Interaction Frame) Recommended scenarios Case Analysis and Case Design |
Sequence diagram of implementation of "borrow books" Use Cases |
5. Interaction overview digoal)
Interaction Overview (interaction overview digoal) Activity diagram and sequence diagram Mixture Intuitively shows the flow logic between a set of sequence charts Core concepts Interactive Frame Branch, transfer Recommended scenarios Case Analysis and Case Design |
Interactive view charts organize multiple sequence charts |
6. Communication Diagram)
Communication Diagram) Collaboration didiagram in UML 1. x) Relationship between objects and interaction activities Core concepts Object and collaboration role Collaboration, interaction, and messaging Recommended scenarios Case Analysis and Case Design |
Communication diagram implemented by the "borrow books" use case
|
7. Timing digraphs)
Timing digraphs) An interaction diagram that shows the actual time information of a message that spans different objects or roles; Specifies the time point when the status of one or more objects changes and the time period during which a specific State is maintained; Sequence graphs are the main means of interaction. You can add time constraints in sequence graphs to indicate the time points for object state changes and the time periods for maintaining specific States. Core concepts Time constraints, duration constraints, and lifeline Status, condition, and event |
Time constraints of the "call" Sequence Chart
Use a time chart to describe a time constraint
|
8. State Machine digraphs)
State Machine digraphs) Uml1.x is a status chart (statechart dimo) Describe the behavior of an object by using status and event Main Concepts Status, initial state, final state, and compound state Events, transfers, and actions Concurrency Recommended scenarios Class Design |
State Machine diagram of "books"
|
9. Component Diagram)
Component Diagram) Encapsulation class as component Description in the systemImplementation environmentRelationship between software components and Main Concepts Component, workpiece, interface (supplied interface, required interface) Dependency and implementation Recommended scenarios System design, implementation, and deployment |
Implementation environment of Component Graph description class
|
10. Deployment Diagram)
deployment Divisor) describes the physical deployment of hardware components required by the system main concepts nodes, components, and locations connection and dependency recommended scenarios system design, implementation, and deployment |
deployment diagram: system deployment |