What is UML?
The UML full name is:Unified Modeling Language also known as Unified Modeling Language or standard modeling language.
is a graphical language that supports modelling and software system development, providing modeling and visualization support for all phases of software development, including requirements analysis to specification, to construction and configuration.
It is a language that is used to describe a thing.
Why should we use UML?
We understand the history of software development before we understand why we use UML.
The history of software is divided into 3 phases:
- Program Design phase "1946 ~1955 Hardware development, small scale, the design of the pursuit of space-saving and programming skills"
- Software design phase "in 1956 ~1970 years, hardware growth speed, cost-effective more and more high, software development technology has no major breakthrough , software PRODUCT quality is not high, low production efficiency, resulting in the" Software Crisis"
- Software Engineering Phase "1970 ~ To date, a large number of demand has been proposed, the use of engineering ideas to manage the program "
The goal of software engineering: The use of engineering methods. Under the premise of cost and schedule, the software is developed with maintainability, correctness and portability. Improve the quality and development efficiency of software products and reduce maintenance difficulties
As software engineering progresses, the IT community wants to use a language to describe the needs and designs that they have completed, but different companies have developed their own products.
Thus, in order to unify, has the OMG organization "Objectmanagementgroup Object Management organization", this organization lets this description demand, the design language unifies , is called is the UML.
In other words,UML is used to give us design, demand analysis .
Using IBM Rational
We are using the IBM Rational tool to explain UML.
In general, we use this tool to do three things:
- Use case diagram
- Class diagram
- Timing Diagram
Use case diagram
The use case diagram shows who will be the users of the system, what services the user wants the system to provide, and what services the system can provide to the user, and describe the functionality of the system from a user's perspective. Use case diagrams are most commonly used to describe systems and subsystems
2 elements of the use case diagram 4 relationships
- Participant (actor)
- Use cases
- Association Relationship (Association)
- Include relationship (include)
- Extended Relationship (Extend)
- Generalization relationship (generalization)
We use it to simulate a use case diagram of a mall
The message we want to describe is this:
- Visitors have the ability to browse products, login and register
- Members have all the features of a visitor and have the ability to shop and manage personal information
- On the shopping, including the purchase of goods, add to the shopping cart, pay so many features
- Payment is also paid on delivery, online payment, and other payment functions.
- No matter what kind of payment, you have to generate an order
- Orders by customer service to manage, customer service also has the function of commodity management
- Customer service has the function, the administrator has, the administrator also has the management member's function.
Class diagram
Class diagrams are used to describe the various relationships between classes and classes in a system
The following relationships are available under the class diagram:
- Inheritance: Parent-child class relationships
- Implementation: Class-to-interface relationships
- Associations (global variables, combinations/aggregates): values, references
- Strong relationship of combination
- The relationship of aggregation is not so strong "normal reference relationship"
- Correlation has navigation: that is, a two-way relationship or one-way relationship
- Dependency: local variable (non-spring dependent injection)
- Local variables in the method
Timing Diagram
When a use case is needed, we can drag the use case over to the time series diagram.
If the article is wrong, welcome to correct, we communicate with each other. Accustomed to look at technical articles, want to get more Java resources of students, can pay attention to the public number: Java3y
UML Unified Modeling Language