During the process of learning UML, you may encounter problems such as the UML modeling process. Here we will introduce the UML modeling process in detail, I hope you will have some knowledge about the UML modeling process through the introduction in this article.
UML modeling process
1. Design
The task of the design phase in the UML modeling process is to extend and refine the model in the analysis phase by taking all the technical limitations into account. The purpose of the design is to define a work plan that is easy to convert into code. It is to refine the analysis work, that is, to further refine the classes extracted during the analysis stage (including their operations and attributes ), in addition, new categories are added to deal with technical issues such as databases, user interfaces, communications, and devices.
The design phase can be divided into two parts: structural design is a high-level design, and its task is to define the package (subsystem), including the dependency between packages and the main communication mechanism. We hope to get as simple and clear a structure as possible, with as few dependencies between each part as possible, and minimize bidirectional dependencies as much as possible.
The second part is the detailed design, refining the package content, so that programmers can get a clear description of all classes. The dynamic model in UML is used to describe the behavior between instances of these classes under specific circumstances.
◆ Structure Design
A well-designed system structure is the basis for system scalability and change. A package is actually a collection of classes. The class diagram helps you to separate the application logic (domain class) from the technical logic to reduce the dependencies between them. This is the principle of high aggregation and low coupling between modules emphasized in the software structure design. In commercial MIS, the following packages (or subsystems) exist ):
User Interface package: User Interface Class allows users to access system data and add new data. In commercial objects, the user interface package cooperates with the commercial object package to call commercial object operations and implement data retrieval and insertion.
Business Object package: includes specific fields from the analysis stage. In the design phase, design these classes in detail to fully define their operations and support access to the database. Therefore, all business object classes must inherit the classes in the database package.
Database package: provides services for classes in the commercial object package for permanent storage.
Utility package: contains the services to be used by other packages of the system.
◆ Detailed design
The purpose of the detailed design in the UML modeling process is to describe the new technology by creating a new class diagram, state diagram, and dynamic diagram, and expand and refine the Business Object Class "sketch" in the analysis stage. These images have been used in the analysis phase, but in the detailed design phase, they describe the system in more detail at the technical level. For example, use case descriptions in the analysis phase are used to verify whether they are processed in the design phase, while sequence diagrams are used to show how each use case is technically implemented in the system.
Database package: the implementation of MIS must support permanent storage objects, that is, databases. Therefore, the database layer must be added to the system to provide such services. Currently, there are many commercial databases on the market, including real object-oriented databases such as engineering databases and traditional relational databases. Since we only discuss the design method and do not involve specific environments, we can abstract a permanent storage class to implement common database operations, such as storage, update, deletion, and query. Permanent classes are similar to the basic classes in MFC.
Commercial object package: the commercial object package in the design stage is the domain class in the analysis stage. These classes need to be refined from the implementation perspective, including how to implement the association and behavior between them. All 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 divided into several operations or changed names in the design model. Because the analysis constructs the framework of each class, and the design is a detailed description of the system, the operation of all classes in the design model must define symbols and return values. Figure 2 is a refined business diagram (partial)
In the design phase, you can also refine the state chart of the analysis phase to show more details about the state transformation (3 ). The state chart can be used to reveal the details of changes of a single object in the entire system, which is helpful for understanding and implementing key classes.
In addition, you can use other graphs to refine the models created at the implementation layer from the same side to the analysis stage.
User Interface package: the user interface package is on the "top layer" of other packages ". In the system, it provides information and support for users. Since all interactions with users are implemented through user interfaces, the UML dynamic model is very suitable for describing GUI packages. Figure 4 Use a sequence diagram to describe the dynamic model for adding new product use cases. Another diagram indicating the order is the cooperation diagram (5 ).
Creating a user interface is a special activity in the design phase. In commercial MIS, user interfaces can be divided into functions (main function windows in the system, such as procurement, inventory, sales, statistical analysis, etc) information (Display System Information Window and Maintenance System window.
Currently, with the rapid development of visualization technology, the design of user interfaces is relatively simple. Generally, the user interface of the application system is composed of a menu bar and a main window of the corresponding image.
2. Implementation
Let's take a look at the implementation problems in the UML modeling process. The construction or implementation stage is the process of programming classes. You can select an object-oriented programming language (such as Java) as the software environment for implementing the system. Java can easily implement the ing from the logical view to the Code parts, because classes are one-to-one ing between Java code files. Figure 6 shows the component diagram of the design model, showing a simple ing from the logical view to the component view. Packages in the logical view are also mapped to the corresponding part view.
In the implementation phase, you can select the following graph description to assist programming:
◆ Class Specification Description: The Specification Description of each class shows the necessary attributes and operations in detail.
◆ Class diagram: displays the relationship between the static structure of the class and the class.
◆ Status chart: displays the possible status of the class object, the transfer to be processed, and the operations to trigger the transfer.
◆ Dynamic graphs (sequence diagram, cooperation diagram, and activity diagram) of objects of a class: displays the implementation of a method of the class or how other objects use the class objects.
◆ Use case diagram and Specification Description: displays system requirements and results.
Design Model defects may also be found during coding. The developer needs to modify the design model. The consistency between the design model and the Code must be maintained when you modify the design model so that it is easy to maintain in the future.
3. Test and configure
After the system code is completed, you need to test the system, which usually includes: unit test, integration test, system test and acceptance test. In unit tests, use class diagrams and class specification descriptions to test individual classes or groups of classes. In integration tests, use component diagrams and composite diagrams, test the cooperation of each component. In the system test, use the use case diagram to check whether the developed system meets the requirements described in the example diagram.
The system configuration is the actual delivery system, including documents and composition models. For commercial MIS, it is a typical customer/server system. You can use the configuration chart to display the physical structure of the system, as shown in figure 7. On the surface, the configuration map shows the relationship between system devices and the relationship between the display nodes and executable software units. However, once a node contains too many objects or executable parts (more than five), it is difficult to clearly describe the relationship with the configuration diagram.
4. Summary
The UML modeling process of the commercial MIS system described in this article can be described in figure 8. The first thing to grasp is how to use case technology to correctly describe system requirements. Class Diagrams in UML describe the static relationships of classes in the system. object diagrams help you understand complex classes. During system development, class diagrams can be used for analysis, design, and implementation. Class package helps design the system structure. Commercial MIS packages include user interface packages, commercial object packages, and database packages. The relationship between them is that the former depends on the latter.
The dynamic model of UML includes the state diagram, sequence diagram, cooperation diagram, and activity diagram. In commercial MIS, sequence graphs are very useful for describing the interaction between commercial objects and are one of the most important means to support the analysis, design, and implementation of commercial MIS.
In short, the nine views provided by UML provide strong support for the system from system analysis, design to implementation from different application levels and perspectives. Different models are created at different stages for different purposes.
UML provides powerful support for user modeling and provides a great degree of freedom. In accordance with the incremental iterative development principle, you can fully analyze, design, implement, test, and configure the microprocess (analysis, design, implementation, and configuration) of each iteration based on the characteristics of your own development system, flexible selection of various diagrams provided by UML.
In the process of UML application, it is also important to select appropriate tools. For simple applications, tools such as Visio and MSWord can support the generation of various required images. However, they are all static images and do not support system modeling and optimization.
In the future, the software development paradigm will have the following three features: first, the degree of Software Development automation will increase; second, there will be fewer and fewer hidden errors in the software developed; third, with the support of the new software engineering environment, you will be able to develop self-adapted software systems. The standard modeling language UML and its integrated support environment will pave the way for this new paradigm.