Key Points and Applications of UML (Unified Modeling Language)

zhaozj2021-02-16  84

UML (Unified Modeling Language) partner organized in 1996 by Rational. Object Management (OMG) adopted it in November 1997. Since then, UML continues to improve, and the latest version is UML1.3. UML is a variety of methods to learn from each other, integrated with each other, tend to be consistent, and to standardized products. Such a unified modeling language will bring many conveniences for software developers and their users. Computer technology in the United States has a large number of software development organizations that have started system modeling, learning and use of UMLs with UML. It has become a trend. my country's software community is also quite focused on UML. Many researchers and technicians have begun to learn and research on UML a few years ago.

There are more people to learn UML, but because of the complexity of UML, it is not a relaxed thing to master the use of UML standard literature and domestic current UML information. For its use, the key is to create a model with its simplicity accurately. In this way, people can grasp the synergy between complex systems and their compositions between complex systems. In order to achieve this, this article is to clarify the key points of UML, and a profile to the software modeling process recommended by the UML, as a process guidance for applying UML.

The definition of UML has two main components: semantics and representation. UML semantic uses natural language description, the representation defines the UML visual standard representation symbol, which determines UML to be a visual modeling language. These graphics symbols and text are used to establish a model of the application level, in semantics, the model is an instance of the meta model. In addition, the definition of UML also gives an accurate regulation of the syntax structure. For general modeling, you should focus on mastering basic concepts and representations, and skilled use of them, and establishing a meta model is a research focus of research methods.

Important: Organization for the system

UML is a visual modeling language that can be described in detail on each modeling element and can generate a document of the modeling model. When using UML, it is necessary to observe the system from a different angle to see a conceptual "view" for this. The view is the projection of the model of the system in a certain aspect, focusing on an aspect of the system. Each view is a collaboration of the figure, and UML defines 9 diagrams. The following table is five views in UML, and each view represents the model of the system in static and dynamic.

The useful view consists of the status chart, describes the system behavior that can be seen by end users, analysts, and testers; design views contain class diagrams, object pictograms, interaction, state diagrams, and active maps, mainly reflecting the functional requirements of the system. The process view contains class diagrams, object pictograms, interaction, state diagrams, and active diagrams, which mainly describe threads and processes that form a system concurrent and synchronous mechanism; implementation view contains component diagrams, interaction, state diagrams, and activity diagrams, reflecting Assembly and documentation of the physical system, mainly for the configuration management of the system, can be equipped with various methods. The deployment view contains deployment diagrams, interaction, state diagrams, and active diagrams, which mainly describe distribution, delivery, and installation of components that make up the physical system. These views can be used in accordance with actual needs.

The model can be defined by the view that the model is semantically closed, which describes the target system from a certain level of view from a specific angle (system statis or design). The view can be organized into a model, and the developer can observe the usage model from each perspective.

The model used to describe the system can be structurally, emphasized the organization of the system; it can also be behavioral, emphasizing the dynamics of the system. For example, RUP has 9 models, which are business models, domain models, conditional models (also known as demand models), analysis model, design model, process model, deployment model, realization model, and test model, for use in different angles. Indicate the system.

The system is a set of subsystems that reflect different sides, and organize these subsystems in order to complete specific purposes (in logic, function and physical positions are high, low coupling). Subsystem is a set of elements, and the elements can also be a subsystem. It is described by a set of models from different angles. The subsystem itself should almost independent, with the environment that is applied, does not overlap each other, and they contact between them.

UML concept model

To understand UML, you need to master the conceptual model of UML, which requires three elements: UML's basic structural block, which gives these structural blocks to put together rules and some mechanisms that are applied to the entire UML, and will be introduced one by one.

Basic construction block

There are three basic structural blocks in UML, which are things, relationships, and diagrams.

Things are divided into structure (including classes, interfaces, collaboration, use, active classes, components and nodes), behavioral things (including interactions, and state machines), grouping things (packages) and annotations (annotations).

There are four relationships in UML, depending on, related, generalized, and realization.

For the above two types of construction blocks, most of them are not difficult to master by studying the corresponding books, and will not be described here. The key points of the map in the UML are explained below.

The class diagram shows a set of classes, interfaces, and collaboration and their relationships, the most common graphs established in the modeling are class diagrams. Description of the system with class diagrams, the system's static design view, contains a class diagram of the actions - focus on the system's static process view. There are multiple class diagrams, and a single class diagram only expresses one aspect of the system. The primary responsibility to be produced in the high level is given at the low-level properties and operations.

Object diagram object diagrams show a set of objects and their relationships. The data structure and static snapshot of the event instance reacted in the class diagram is used. Object charts express system static design views or static processes views, in addition to real and prototype factors, it is the same as class graphics.

The status map shows a set of things, participants, and relationships between them. The static use of the system can be described by the use of the status diagram. The status map is quite important in terms of system behavior organization and modeling.

Interaction interaction interactions exhibits an interaction in accordance with a certain purpose, which consists of information in a set of objects and their interaction between a context. Interacting diagrams can also be used to describe a behavior of a use. The sequence diagrams and collaborative diagrams are interactive, sequential diagrams, and collaborative diagrams can be converted to each other.

The sequence diagram exhibits a set of objects and messages sent by this group of objects to model control flow in chronological order. Use the sequence diagram to illustrate the dynamic view of the system.

Collaborative diagrams show a set of objects, the connection between this group of objects, and messages sent and received in this group of objects. It emphasizes the structural organization of the object that sent and receives the message, moderates the control flow according to the organizational structure.

The state diagram illustrates all possible states of a particular object and the transfer between states caused by the occurrence of various events. One state diagram describes a state machine that describes the dynamic view of the system with a state diagram. It is especially important for the behavior modeling of interfaces, classes, or collaboration, which can be used to describe the life cycle of the unvent instance.

The activity map is a special state diagram that describes the activities you need to do, the order in which these activities (multiple parallel), and workflow (steps required to complete the work). It is especially important for the system's functional modeling, emphasizing the control flow between the objects.

High-level activity maps are used to indicate some tasks that need to be completed, that is, for analysis, understanding the workflows, multi-threads, and parallel, showing interconnected behavior, and can also be used to model each other. Modeling of the system's function. Low-level activity drawings are used to represent a method of classes. However, the activity diagram does not apply to the relationship between the action and the object, the cooperation between the display, and the operation of the display object in the life cycle.

The component map member map shows the organization and dependence between a set of components, used to model the original code, the executable release, physical database, and adjustable system modeling.

The deployment diagram deployment diagram shows the runtime processing node and the partners. It describes the physical topology of the system hardware (including the location of the network layout and components on the network), and software executed on this structure (ie, the distribution of the runtime soft component in the node). Use the deployment diagram to illustrate the static deployment view of the system structure, that is, the physical system that describes distributed, delivered, and installed. 2. Use the rules of the construction block

UML is used to describe the semantic rules of things: for things, relationships, and map names; give a name with a specific meaning context, how to use or see the name, the visibility; how things are correct, consistent with each other , Ie integrity; what is the meaning of operation or analog dynamic model, that is, execution. In addition, UML also allows certain elements of the model to hide the model at a certain stage, miss some elements and the integrity of the model, but the model is gradually intended to achieve completeness and consistency.

3. Mechanism

There are four mechanisms that consistently apply throughout the language, making the language simpler. These four mechanisms are detailed, modified, universal division and expansion mechanisms.

UML is not just a graphical language. In fact, there is a detailed description of each part of its graphical representation, providing a text description of the syntax and semantic text of the construction block.

Each element in the UML representation has a basic symbol, which provides visual representation to the most important aspect of the element, and other details are also included in the description of the elements. For example, whether a class is an abstract class, or whether its attributes and operations are visible. To add such modifications to the basic symbol.

In the system modeling of the face-to-object, there are at least two ways to divide the world: the division of classes and objects; the division of interfaces and implementations. The structural blocks in the UML have almost all of the two points.

UML is open and can be extended with a limited method. The UML expansion mechanism includes a structural type, tag value, and constraint.

UML application

UML is a modeling language, not a method, which is independent of the process. It is conducive to it to model any type of modeling process. The authors of the modeling language give a recommended modeling process guidance, ie RUP. This section describes how RUP supports UML applications.

RUP is a process of using conditions as driven, architecture centered, iterative and incremental. RUP includes four phases, each stage is divided into several iterations, each iteration has a core workflow (including 5 activities), see the figure below.

The usefulness drive is intended to retrore the user's true demand for each stage of the final product. The architecture is the development of concern the development of the architecture model to guide the subsequent system to ensure the smooth evolution of the system. Every iteration includes iterative plans, iterative evaluations, and some specific activities. About five activities in the core workflow: demand, analysis, design, implementation and testing are better understood, here is not described here. The following is an explanation of the work to be done in the four stages of RUP.

Initial stage

This stage is determined whether the project set up is feasible, and the following work should be made:

There is a probably understanding of the demand, determine most of the characters and conditions in the system, but this time is briefly. Detailed to the main subsystem of the system architecture given.

Identify the risk of impact project feasibility.

Considering factors such as time, fund, technology, project scale and efficiency.

Pay attention to business conditions and develop a development plan.

2. Refining the stage

Identify most of the remaining conditions. Detained, analyze the processing flow, status details, and state changes that may occur during the current iteration. When refining the flow, you can use the program block diagram and cooperation map, you can also use the activity diagram, class diagram analysis.

Treatment of risk

Demand risk considerations if the project is deviated from the needs of users. To solve the risk of demand, we should fully understand user needs and the priority of the demand, and you should also list all the conditions, at least important use, and establish a concept model of the field.

Technical risk investigation is feasible. Establishing prototype is an effective way to solve technical risk.

Skill Risk Consider Whether the quality of personnel to implement the project can be qualified for the requirements of the project. Policy risk considerations the impact of policy-based factors on the project.

Make high-level analysis and design, and make structural decisions

The resulting baseline architecture includes list of conditions, field concept models, and technical platforms. The architecture established in the refinement phase cannot be too large.

Develop a plan for the construction stage

The refinement phase is completed, which means that the following tasks have been completed: it is fully refined and accepted by the user; complete the concept verification; complete class diagrams; developers can give project estimates ); All risks based on conditions (can be divided into high risks, possible risks and impossible risks), and formulate corresponding countermeasures and plans; priority to the condition (can be divided into must be implemented first, Implementation and long-term implementation in the short term).

3. Texture phase

Identify the remaining use. Each iterative development is targeted, design, encoding (such as class declaration, attribute declaration, scope declaration, function prototyping declaration, inheritance, etc.), test and integration processes, a subset of the product to meet the needs of the project . Since the software design in the refinement phase has been completed, such each item group can be developed concurrently.

After the code is completed, ensure that it meets standard and design rules, and quality checks. For new changes, the code is converted into a model by reverse tool, modify the model, re-generate the code to ensure software and model synchronization.

This stage is to establish a class diagram, interactive diagram, and configuration diagram; such as a class has a complex lifecycle, drawing a state diagram; if the algorithm is particularly complex, the active map can be drawn.

4. Transfer phase

This phase completes the final software products and final acceptance tests, and completes user documentation and user training.

Conclude

It can be said that UML's expression ability of the system model exceeds any object-oriented analysis and design method. The problem that occurs is that its complexity is also exceeded in the past. Due to the complexity of UML, it is not a relaxed thing to master and use it. It is recommended to master and use the principle of simply distraction, that is, after skilled, the basic concepts and representations are skilled, and then learn more in-depth parts of UML. The "The Unified Modeling Language" written by the three founders of UML is also the organizational content. For the authors recommended by the UML, please read the "The Unified Software Development Process". In addition, Peking University has also launched a set of bluebirds to target software development specifications, including a very complete process guidance.

转载请注明原文地址:https://www.9cbs.com/read-14619.html

New Post(0)