UML Points and Applications

zhaozj2021-02-08  489

UML Points and Applications

Wang Lifu

(This article is reproduced from Software Engineering Expert Network www.21cmm.com)

---- 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. 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.

---- Now there are more people want to learn UML, but because of the complexity of UML, it is not a relaxed thing to master by 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.

---- UML definition There are 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 visualized 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 view can be defined by the view that the model is semantically closed, and it 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, emphasized the dynamic aspect 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 sets that reflect the subsystems of different sides, and organize these subsystems in order to complete specific purposes (high cohesion, low coupling in logic, function, and physical location).

---- 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

---- In order to understand UML, you need to master the conceptual model of UML, which requires three elements: UML's basic structural blocks, how to put these structural blocks, and some mechanisms that are applied to the entire UML, below Introduce.

Basic construction block

---- There are three basic structural blocks in UML, which are things, relationships, and graphs, respectively.

---- Things are divided into structure (including classes, interfaces, collaboration, use, proactive classes, components and nodes), behavior (including interaction and state machine), grouping things (package) and annotation (annotations).

---- There are four relationships in UML, which are dependent, associated, generalized, and realization.

---- For the above two structural blocks, through the research, the corresponding books, most of them are not difficult to master, and will not be described here. The key points of the map in the UML are explained below.

---- Class map 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 diagram shows 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.

---- An artificial diagram showing 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 Mutual Mutual Figure shows a interaction at a certain purpose, which consists of information in a context of a set of objects and between them interact. 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.

---- Sequence diagram shows a set of 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.

---- Collaboration map shows a set of objects, and 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 shows all possible states of a particular object and the transfer between the occurs caused by 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.

---- Active map activity diagram is a special state diagram that describes the activities you need to do, perform the order of these activities (more 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 map is used to indicate some of the tasks that need to be completed, that is, for analysis, understanding the workflow, multi-threading, and parallelism of multiple applications, showing interconnected behavior, and can be used to enterprises Process modeling, modeling of the system. 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.

---- Deployment Diagram deployment diagram shows the fair processing node and the part of the component. 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; what is correct, Consistent interconnection, ie integrity; what is the meaning of running or analog dynamic models, 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 this language simple. 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.

---- UML representation has a basic symbol, which provides visual representation of 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 system modeling of face-to-face-oriented objects, there are at least two commonly divided 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, can be expanded 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 the process of using the drive, the architecture is 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

---- It is feasible to determine whether the project set up this stage is feasible, and the following work is required:

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 target 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 Selected Technical Program is feasible. Establishing prototype is an effective way to solve technical risk.

---- Skill risk considers whether the quality of personnel in implementing projects is competing for the requirements of the project.

---- Policy risk considerations' impact on projects.

---- ● Perform 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 phase.

---- 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 (can be divided into accurate, people Month and cannot be estimated); all risks are considered based on the condition (which can be divided into high risk, possible risks and impossible risks), and formulate corresponding countermeasures and plans; the usefulness is prioritized (can be divided into It must be implemented, realized 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 standards 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 phase is to establish a class diagram, interactive diagram, and configuration map; 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 product and final acceptance test, and completes user documentation and user training.

Conclude

---- It can be said that UML's expression ability of the system model exceeds any other 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-547.html

New Post(0)