V. Application examples of standard modeling language UML

xiaoxiao2021-03-06  70

UML is a modeling language instead of a method because there is no concept in the UML, and the process is an important part of the method. UML itself is independent of the process, which means that the user can use any suitable process when the UML is modeled. The selection of the process is related to the different factors of the software development process, such as the types of developments (such as real-time systems, information systems and desktop products), and the development of organizations (such as single development, group development, team development). Users will use different processes depending on the needs. However, using UML modeling still has a substantially unified process framework, which includes common elements in the UML modeling process, and also provides a lot of freedom for users to make a suitable modeling technology they develop. .

1. UML Modeling Process Ultimate View Figure 2 is a high-level view of the UML modeling process. This is an iterative incremental development process. Using this method, it is not submitting software at a time at the end of the project, but is divided into subsequent development and submission. The construction phase consists of multiple iterations, each iteration contains coding, testing, and integration, and the resulting product should meet a certain set of project requirements, or submitted to the user, or purely internal commit. Each iteration contains all the phases of the software lifecycle. At the same time, each iteration has to increase some new features to solve some new problems.

Therefore, the first thing to do is: Select some function points, then complete these features; then choose another function point, so looped. The first two phases are the initial (Elaboration). In the initial phase, you need to consider the benefits of the project and determine the scope of the project. This phase needs to be discussed with the project. In the refinement phase, it is necessary to collect more detailed needs, perform high-level analysis and design, and formulate plans for the construction phase. When using this iterative development process, there are some work (such as beta test, performance debugging, and user training, etc.) to be placed in the last translation phase.

In fact, microemers involving actual modeling work are present in each iteration described above. Iterative development is an important guarantee for project success.

2. UML actual modeling process

Each iteration is divided into the following phases: The purpose of the modeling stage is to capture the functional requirements, analysis, analysis, and extraction of the "Objective World" field of the developed system and describe their cooperation profile. The purpose of designing stage modeling is to achieve the environment, the model extension and transformation into a feasible technology implementation scheme by considering the realization environment. The implementation phase is the specific work is to coding, and the configuration model is correspondingly corrected. The configuration phase describes the hardware and software configuration of the developed system through the model. The test phase uses the model constructed in the first few phases to guide and assist the test work.

In the different stages of system development, use UML is modeling for system, and the system can be described by establishing different models, from different perspectives, the system is described in different detailed signs. The development process of a business management information system is taken as an example. Specifically, the actual process of UML modeling: (1) The principal demand specification of the original version of the commercial MIS should be provided by the personnel of the final user of the system, including the basic function of the system Demand and requirements for computer systems. It is generally described as follows: · It is a commercial support system; · The goods needed for the purchase of purchases; · The security deposit will be registered into the library; • Dialman transfer the stock product to the corresponding sales department; · Sales department selling goods · · Statistical departments account for business mall management; • The system can run in a common technical environment (such as UNIX, Windows, etc.), which has a good graphical user interface. The system is easy to maintain, which is easy to expand. Since UML-based system development takes increment and iterative mode, the initial version of commercial MIS only needs to complete the most basic function of the system (basic business), and other functions (such as goods transfer tube, electronic order, electronic payment, network sales, etc. The following is done in later versions.

(2) The task of analyzing analysis is to find all the needs of the system and describe, and establish models to define key areas in the system, should be completed by system users and developers. This phase does not stick to design details and technical solutions.

The first step in demand analysis analysis is to define the use case to describe the external functional requirements of the developed system. Use case analysis includes reading and analyzing demand descriptions, which requires discussion with the potential users of the system. The main components of the use case model are used examples, roles, and system boundaries. The use case is used to describe each functional requirement, the system boundary is used to define the system functionality, and the role is used to describe external entities related to the system function, which can be a user or an external system. In this example, by analyzing, first confirming the role in the commercial MIS sales staff, stock staff, purchasing personnel, auxiliary personnel and analyst. On this basis, confirm the use case. The use of commercial MIS has order procurement, inventory management, merchandise sales, statistical analysis, system maintenance (including adding goods, canceling goods, making labels, price changes, cancel, or updating tags). As shown in Figure 3.

In addition to the use of an example to describe the system requirements, you can also use a text (or active diagram) to perform a demand for each use case, more specifically, more specifically interaction with the role. For example, we can describe the needs of order procurement cases as follows: • If you are new products: a. New product registration; b. Purchase purchase; c. Registered in the library. · If the goods inventory is insufficient: a. Purchase purchase; b. Registration into the library. Order procurement needs can be described in an active diagram, as shown in Figure 4. Since the needs of the use case directly affect the positioning of the subsequent design phase, the demand for the use case should be as comprehensive and accurate. It is worth mentioning that most of the use cases can be determined in the system requirements analysis phase, but with the progress of the system, more use cases may be found, and even find that the exemplary defined in front is not exact or wrong, it needs to be re-modified . Therefore, throughout the system development, you should pay attention to the use case.

Another job in a particular area analysis phase is a specific area analysis to list specific domains in the system. We can conduct specific domain analysis by reading specifications, use cases, and "concept" to find system processes, or can be discussed by users and domain experts to identify all critical classes to be processed and their interrelationships. The particular area here refers to specific business areas instead of the entire system. In this example, it is possible to determine the specific sectors of the commercial MIS as commodities, quality products, non-quality goods, items, sales, ordering, inventory, vendors, and class diagrams to describe the system domain and their relationships. It is important to emphasize that this stage has certain sketch properties for the description of a particular domain class, that is, the operation and attributes of a particular domain class are not necessarily consistent with the final implementation. Because there is no specific implementation involving system functions, it is impossible to define them accurately and completely. Some operations need to be determined when designing the design phase. Further, in order to describe dynamic behavior of the domain, any of the dynamic diagrams (such as sequential diagrams, active diagrams, cooperation diagrams) can be used. The dynamic maps in this stage have sketch nature, mainly to assist in the analysis of the domain and their interrelationship, and lay the foundation for the specific design of the next stage. UML modeling is a flexible process, and users do not have to draw various pictures. For each picture, only if necessary (for example, can help analysis, design, guidance, deepening, deepening, promoting communication, etc.), such a picture is meaningful to modeling, otherwise it will waste energy and stronger.

(3) The task of the design design phase is to extend and refine the model of the analysis phase by comprehensively considering all technical limits to expand and refine the model. The purpose of the design is to indicate a work program that is easy to convert to code is the refinement of analysis, that is, further refine the class (including its operations and attributes) extracted in the analysis phase, and increasing new categories to handle, such as databases. Problems in technical fields such as user interface, communication, equipment. The design phase can be divided into two parts: structural design is high-level design, its mission is to define the package (subsystem), including the dependence and main communication mechanism between the package. We hope to get as simple and clear structures, depending on the dependence as small as possible, and reduce the bidirectional dependencies as possible. The second part is a detailed design, refining the content of the package, so that the programmer gets a sufficiently clear description of all classes. Simultaneous use of dynamic models in UML, the behavior between these classes is described in a particular case. • Structure Design A good design is a basis for system-expandable and changeable. The package is actually a collection of some classes. The class diagram includes help users separate application logic (domain classes) from technical logic, thereby reducing the dependence between them. This is the principle of high polymerization and low coupling between the software structure design emphasized. In commercial MIS, there is a package (or subsystem): user interface package: User interface class allows users to access system data and add new data. In the business object, the user interface packs with the business object package, calls the operation of the business object, implement the search and insertion of the data. Business object packages: including specific domains from the analysis phase. In the design phase, these classes are designed in detail to complete their operations to support access to the database. Therefore, all commercial object classes must inherit the class in the database package. Database Pack: Provide services for class in the commercial object package for permanent storage. Package: Contains services to use for other packages. The intrinsic relationship between them is shown in Figure 1.

· Detailed design detailed design is to describe the new technical class and expand and refine the business object class "Sketch" by creating new class diagrams, state diagrams and dynamics. These images have been used in the analysis phase, but in the detailed design phase, they are more detailed in the system from the technical level. If the use example of the analysis phase is used to verify that they are processed in the design phase, and the sequence diagram is used to display how each used case in the system is technically implemented, and so on. Database Package: The implementation of MIS must have a permanent storage object that is, the database is supported, so the database layer must be added to provide this service. At present, there are many commercial databases on the market, and some are real object-oriented databases such as engineering databases, and some are traditional databases. Since we only discuss design methods, do not involve specific environments, therefore, you can abstract a permanent storage class to implement common operations for databases, such as storage, update, deletion, query, etc. Permanent class is similar to the base class in the MFC. Commercial object package: The commercial object package in the design phase is the domain class of the analysis phase, which needs to be refinered from the achievement angle, including how to achieve the association and behavior between them. All of these object classes must be inherited from the permanent class of the database package. The operation of the class described in the analysis phase may be decomposed into several operations or change the name in the design model. Because the analysis is to construct the framework of each class, the design is a detailed description of the system, so the operations of all classes in the design model must define symbols and return values. 2 is a state diagram (partial) in the design phase, also detailed in the design phase, and more detailed display state (Figure 3). Using the status map can reveal the details of the variation of a single object throughout the system, which is helpful for understanding and implementing key classes. In addition, other images can be used to refine the models established from different sides on different sides on the implementation layer. User interface package: User interface package "top" in other packages. In the system, it provides information and support for users. Since all interactions with the user are implemented through the user interface, the dynamic model of the UML is ideal for a description of the GUI package. Figure 4 shows the dynamic model of the new commodity usage with the sequence diagram description system. Another figure representation is a cooperation diagram (Figure 5). Establishing a user interface is a special event in the design phase. In commercial MIS, the user interface can be divided into functions (main function windows in the system, such as procurement, inventory, sales, statistical analysis, etc.), information (display system information window, etc.) and other three parts. Currently Due to the rapid development of visualization techniques, the user interface is relatively simple. In general, the user interface of the application system consists of a main window with a menu strip and a corresponding graphic. (4) Implementing the construction or implementation of the class is Procedures for programming. You can choose some object-oriented object programming language (such as Java) as a software environment for implementing the system. Java is easy to implement mappings from logical views to code parts, because class to Java code files are one-one mapping relationship Figure 6 is a component diagram of a design model, a simple mapping of the logical view to the part view. The package in the logical view is also mapped to the corresponding component view. In the implementation phase, the following diagrams can be selected to assist programming: • Specifications for class: Specifications for each class show the necessary properties and operations in detail. · Class diagram: Display the relationship between the static structure and classes of the class. • State diagram: Display the object of the object, The transfer of demand and triggers the operation of these transfer. • A dynamic diagram of an object of a class (sequential diagram, cooperation diagram, activity diagram): Show how the implementation or other object of a method of this class is how to use this class Objects. · Model and Specifications: Display System Demand and Results. During the encoding period, the design model can be discovered. At this time, it is necessary to modify the design model. Modify the design model to maintain design model and encoding Sexuality is easy to maintain. (5) After testing and configuring the system encoding, you need to test the system, which usually include: unit test, integrated test, system testing and acceptance test. Use class diagrams and classes in unit testing Specifications, testing separate classes or sets; in integrated testing, use component maps and cooperation diagrams, testing the cooperation of each component; in system testing, use case diagram to test the system developed Whether to meet the needs described in the example. The configuration of the system is the actual delivery system, including documents and composition models. For business MIS, it is a typical client / server system. You can use the configuration diagram display system physical structure As shown in Figure 7. From the surface, the configuration diagram can display the relationship between the system device and the display node to perform the correspondence between the executable software unit. However, once the object or executable component inside a node (exceeding 5), it is difficult to fully describe this relationship with the configuration diagram.

(6) Small knot

The UML modeling process of the commercial MIS system lifted herein can be described in Figure 8. Among them, we must first grasp how to use the use case technology to correctly describe the system requirements. The class diagram in the UML describes the static relationship between the system, and the object map helps to understand complex classes. During the system development, class diagrams can be applied to analysis, design, and implementation. The package of classes helps to perform system structure design. Commercial MIS package is divided into user interface packages, commercial object packages, database packages, and the relationship between them is the former reliance. The dynamic model of the UML includes state diagrams, sequential diagrams, cooperation graphs, and activity diagrams. In commercial MIS, the sequence diagram is very useful to describe the interaction of business objects, which is one of the most important support for commercial MIS analysis, design and implementation.

In summary, the nine views provided by UML are analyzed from systematic analysis from different application hies and different angles, and design itself until achieving support. Establish different models in different stages, the purpose of modeling is different.

UML provides strong support for user modeling and provides a lot of freedom. User can fully select the various types provided by UML according to the characteristics of its own development system, in accordance with the characteristics of its own development system. Fig.

In the UML application, choose the right tool is also important. For simple applications, Visio, Msword and other tools can support the generation of various desired graphics. But they are static graphics, they cannot support the modeling and optimization of the system.

Future software development paradigm will have the following three features: First, software development automation will be getting higher and higher; secondly, there will be fewer and fewer errors in the software developed; third, in the new software engineering environment With the support, it will be able to develop an adaptive software system. Standard Modeling Language UML and its integrated support environment will focus on this new way of paving the road.

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

New Post(0)