Introduction to powerdesigner UML modeling

Source: Internet
Author: User
Tags powerdesigner

Http://tech.it168.com/m/2007-08-28/200708282033503.shtml

 

Introduction
Powerdesigner supports all uml1.3 charts, including use case charts, sequence charts and class charts, activity charts, and component charts, and fully supports uml2.0. Improved Object-Oriented Analysis and Design (OOAD) analysis methods and enhanced integration with the development process.

Powerdesigner can help you build traditional business and e-commerce systems that adapt to the development of modern IT, using Java and other object-oriented languages, XML and other new technologies, merge with our database technology in a physical or virtual way. Our goal is to provide the ability to access information and control business processes anytime and anywhere based on your needs, and give enterprises a competitive advantage in any market today through computers and the latest technology.

Our analysis methods and design technologies will be varied, from business process modeling to UML object-oriented analysis and design, as well as traditional relational modeling. This article will help you gain an in-depth understanding of UML, a powerful technology that helps your enterprise create efficient traditional business and e-commerce systems.

Object-Oriented Analysis

Before you invest in systems and software for an enterprise, you must first understand the actual needs of the enterprise and determine how the deployed technology will help your enterprise achieve greater success. You can use UML to analyze data by using the use case diagram, sequence diagram, and activity diagram. These charts help you plan the scope, dynamic performance, and presentation of the system. You don't have to consider the implementation details. All you want is the system performance you need.

Use case diagram)

The UML use case diagram provides a modeling method for the system environment. It helps you determine the external and internal elements of the system/application and the scope of the system. As a graphical modeling model, it will also be helpful when you need to talk to the collected system requirements. It is of critical importance for the development team that develops finished products. It can also be of great help to the enterprise owner or the users who first come into contact with the software products. The use case diagram can visually express how the system meets the collected business rules and specific user requirements.

InLater stages of the project, you can also use the UML use case diagram. You can help test the functions of a project through the requirements defined in the use case diagram. You can not only verify the system performance without errors (no crash or obvious non-logical response), but also verify that the specified command is executed as required during system running. In this way, you can test whether the system fully meets the requirements to ensure that the finished product can be put into production-that is, it fully meets the needs of users.

Only by meeting reasonable and practical needs can we ensure a greater success for IT projects.

The sequence Divisor)

You can use UML sequence diagrams to refine requirements and link design elements. A sequence diagram allows interaction between high-level and low-level objects. The interaction is displayed between the role (the same as the role in the use case diagram) and the class instance (the technical object and detail object running in the computer memory.

With a sequence diagram, you can describe system behavior that changes over time based on the precise sequence of events (messages) in a specific system scheme. Use a sequence diagram to analyze use cases and guide the design: You can decide the system object types that are responsible for the management tasks defined in the use case diagram, and decide which object will manage the "session" or communication inside and outside the system. As messages have been extracted from the sequence diagram, you can describe some of the key operations (methods) required for classes and interfaces (the code elements we finally compile and deploy ).

Activity diagram)

The UML activity diagram design helps you understand the dynamic changes of objects in the system. Describes how a particular class or a group of classes work collaboratively. Unlike the sequence diagram, the activity diagram is not a series of time-related communications, but a control transfer from one task to another. It also specifies who (which object) is responsible for the task.

The UML activity diagram is also a technical view of business processes. You can analyze business workflows or obtain activity diagrams after "Business Process Modeling.

The activity diagram also helps to construct a detailed dynamic view of elements in the system (how to implement EJB interoperability, etc ).

Promote design through analysis

The analysis model can capture system intent and expected behavior independent of the Implementation Details, and has nothing to do with the language used, the deployed application server, or the architecture used. However, everything has changed since the design phase began. You must enter the details of the production environment and build the software into a specific architecture. Design is the implementation of the system.

If the design is obtained from analysis, you can be more confident about the correctness of the written system behavior and confirm that the developed results will be a system built on demand. You will be highly successful-to give users the desired system. You can also directly use the information obtained by analysis without recreating it during the design process, reducing development time and reducing human errors because you do not have to "re-Copy" any work.

What can we get through analysis? You can use the example diagram to discover objects and promote the creation of classes and interfaces. One or more classes and interfaces can implement one role. You can directly create classes and interfaces in the role definition. You can also link a role to an existing class and interface to show how to use a piece of code to satisfy multiple elements analyzed.

You can use a sequence diagram to discover methods and promote the creation of class operations. To send messages to a class, you can call the method of this class. Messages in a sequence diagram can be used to automatically create an operation or link to an existing operation. You can use the link tracking method, including the input content and the content that must be returned.

Design Content

You already know what you want to build. Now you need to describe how to build it. You need to determine the location of the business logic: It can be placed in the EJB and other components of the application server, it can also be placed in a class or component that uses a language such as VB or Powerbuilder and is part of the client application, or built into a relational database as a trigger and process. You need to make some choices based on your needs, including scalability, security, performance, and accessibility.

UML class diagrams and component diagrams are used to define detailed static structures of technical systems.

The class digraphs)

UML class diagrams, business logic, and all supported structures are used together to define all the code structures. Since the class diagram is used to simulate the actual code maintained during development, it is obviously a general expression of object languages such as Java or Powerbuilder. You can also use UML class diagrams to summarize the complex structures in XML, making it easier to develop and understand.

You can generate code from the UML class diagram. You can also edit the code during development to complete, test, and deploy the final running application. Since powerdesigner has a 1:1 ing function of between the object language and UML class diagram, you can also implement reverse engineering code, read the source file and create a new class diagram. You can have a deeper understanding of the existing system and simplify integration and maintenance.

The component Divisor)

The UML component diagram is used to describe the definition and correlation of advanced objects in a larger black box view. It is still a design model and a summary of the Code. For example, an EJB component ID is directly linked to a series of classes and interfaces required for implementation, and the required code is generated to Promote the Development of the final bean.

The component diagram is easier to understand and manage than the code layer view of the component architecture. You can also share and reuse code by writing the Component Interface documentation. You can use the code in other projects and systems without having to (or seldom) understand the implementation details of the component.

Right-click customer entitybean_cmp, select create/update class digoal, and generate the following class digoal:

Cyclic Generation Project

The world is not static, so are your IT projects. After you understand the requirements, design through analysis, and construct some elements of the system, you will inevitably encounter new changes, such as updating the definition, or there are some errors in the existing use case diagram that need to be corrected, the code is edited in the IDE and text editor, and the database is optimized by DBA. All the details that need to be changed must be managed and mastered to ensure that the built system is consistent with the business needs.

One solution of the round-trip project is to reflect the code in the class diagram when the code is changed during the development process. The details are as follows:
1. Create a class chart and add the business logic elements to the model.
2. Generate the application code of the file system
3. Edit the code in the IDE or text editor.
4. Edit the design and ignore the changes in the generated code.
5. reverse engineer the edited content until it is consistent with the existing class diagram.
6. Synchronize the work completed during the design process with the content edited during development (merged)
7. generate a new code, which is the sum of the code that the design code and developers change.

When the class diagram is modified to reflect the new design content, the synchronization/merge technology should be used to prevent the loss of developers' work results, at the same time, designers are allowed to accept or reject changes made during the development process. In this way, powerdesigner enables it to fully control the architecture, which is the key to success.

This is not the only function of powerdesigner! Now that the design model has been updated, you can link these changes to the analysis. You may find new requirements in the analysis. You can reflect this change to the design and write the code. With the advanced compare/merge Technology in powerdesigner (discussed in September blueprint), you can get real round-trip synchronization across all models and phases of the development cycle.

Object digraphs)

Like a class diagram, an object diagram is also a UML static structure diagram. It defines the physical elements that the system has at a given time without considering the dynamic activities of the system. It is one-to-one correspondence with the code, but different from the class diagram, we are discussing the specific classifier instead of the classifier definition. It is most appropriate to describe an object graph as a class instance graph.

Object graphs are mainly used for analysis. There are uncertain constraints between classes that cannot be expressed in the class diagram. We will use an object graph to record these constraints. In addition, when we view examples of managed classes to illustrate the interaction between these elements, the object graph also allows us to define a specific "what if" scenario.

The following content applies to beginners of OO modeling: classifier is an abstract object structure definition. A classifier can tell us what type of data is managed (attribute/member represents data elements) and what capabilities the classifier has (Operations/methods represent object behavior ). The instance is an example of a specific classifier. Assume that a class named customer is defined, which has the name attribute. The instance "Jane Doe" for the customer type is the customer named "Jane Doe. An instance is generally more informative than a classifier, because the classifier represents an overview of a certain level. Collecting several instances or examples of a classifier may help you understand its purpose and use it better.

Therefore, an object chart is a class chart that represents a class instance sample and displays the key value and relationship. For example, the customerbean class has the following Customer instance: the customer ID is 52271 and the name is "John Doe ". This customer instance is associated with three order instances (three orders). The order numbers are 122047, 122103, and 122399, respectively.

Colcollaboration Diagram)

The collaboration diagram is very similar to the sequence diagram. In fact, the sequence diagram and collaborative drawing can be effectively used in turn and can be easily converted to each other. The difference is that users have different ways of reading and understanding. A sequence chart has a good hierarchy and is constructed around time. A collaboration diagram is mainly constructed around the object structure. Messages are numbered in the figure to indicate the order of messages. In this way, the timing relationship is maintained even if the graph structure is not time-based.

A collaboration diagram represents the dynamic aspect of the system by means of interaction between elements or objects in the system. It supplements class charts and object graphs by representing the static structure of the system. Instead of using structure-based relationships, it transmits the interaction "message" between system objects ".

You can also test the static model at the conceptual level when constructing a collaboration diagram. Class instances are defined in the class diagram. The interaction between these class instances defines a specific usage scheme and internal communication between these elements. We can also use other roles to represent the external and internal users of the system, such as the use case diagram.

For example, we can establish an order Input System for customers and sales representatives to use. The customer interacts with the system by creating a new order. There is a dialog between the order object and the sales object, which is represented by a link message. In this case, there are only two messages: one is an order request from the orders class, one is the order confirmation from the sales class. There is no limit on the number of messages on a link. The conversation we discuss here starts with an order request and then confirms the order.

Applicability

Collaboration diagrams are especially important to designers because they clarify the role of objects. You can construct a collaboration diagram before a sequence diagram (if you plan to construct the two diagrams ), however, a collaboration diagram is usually constructed after the class diagram is completed to illustrate the interaction between the objects exported from the class. One or more associations can be used to implement one use case, or complex behaviors can be divided into multiple logical sub-behaviors.

Status chart (statechart divisor)

A state chart (also known as a state machine) describes the behavior of a specific class or component that is constantly changing throughout its lifecycle. This figure shows what triggers the transition from one state to another, and what operations are called on this class to provide the behavior of this State or trigger this transition. For example, an order is in the initial state when it is created. After the customer confirms that the order is correct, the order enters the confirmation status. After delivery, the order needs to go from the confirmed status to the delivery status.

Therefore, every time a class has different available options (different valid behaviors) at different stages of its lifecycle, you can use a status chart to model these rules and conditions. Each stage in the lifecycle is a State of the object, and each trigger that changes the State represents a transition from one state to another. You can switch from a certain State to any other State as needed, or from other States to a certain state.

Sub-status chart

To keep the status chart simple and easy to read, you may find that one or more States actually involve more complex behaviors, so that they can be defined as a status chart. In this case, a better way than adding a large number of complex details to the Master Chart is to break down the separate state into multiple sub-States to form an auxiliary graph, to define more complex internal behaviors of the parent state.

Deployment Diagram)

The deployment diagram helps us determine where all code elements are stored on servers, workstations, and databases. Some nodes need to rely on hardware or software boxes to run some business logic. These node interactions demonstrate how the multiple computers and systems we developed interact and integrate. Nodes include component instances that will be deployed to databases, applications, or web servers.

The deployment diagram is used to deploy the component to the server. By defining the location where you want the components to run, you can quickly map, deploy, and manage the business logic or database-side server logic between client applications and application server-side components. The following is a 1:1 model of the physical architecture to be managed.

For example, suppose we have decided to implement two Enterprise Java Beans and run them on the application server. Displays a single node and two components in the node (one component for each EJB ). We can see that employeebean depends on the mermerbean in the same application server.

Conclusion

When we use the use case diagram, sequence diagram, activity diagram, class diagram, and component diagram to complete basic UML modeling, we need other tools to define detailed information about certain elements in the system. We may want to use precise examples in the object graph to represent the structure of the object, or use the state graph to learn more about the behavior of classes with multiple complex states inside the object. We need to use a collaboration diagram to examine the interaction between system components from the perspective of structure rather than time. Finally, you need to use a deployment diagram to display the locations of all system components in the physical hardware or servers in the running environment, so as to learn more about the usage of the distributed architecture.

UML provides us with more practical charts to complete the technical analysis, design, development, or deployment of business logic. Combining these nine charts with traditional data modeling methods and new business process modeling methods, we can choose from advanced requirements to technical and data requirements, and all aspects of physical implementation to fully understand all the factors driving Software Development

Help Tag: UML powerdesigner Object-Oriented Modeling

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.