Java Modeling: UML workbooks, part 1th-sequence diagrams Introduction

Source: Internet
Author: User

Unified Modeling Language (UML) is a standard notation for building object-oriented system models. Between 1995-1997 and a half years, UML boarded the stage of the object-oriented programming community and was recognized by the Object Management Organization (OMG) in the late 1997. Although it was initially controversial-because it was put forward in a piece of support and opposition-UML became the industry standard for system tagging. The current version of UML is 1.4, and it continues to evolve to meet the needs of object-oriented developers.

UML may be difficult to learn, mainly because it attempts to provide modeling notation for quite a wide range of situations. Each modeling notation uses a graph, and there are currently nine diagrams in the UML specification. Thankfully, learning UML can be a gradual process; each time you can learn only one diagram, you don't have to include something very complex on the first trial.

In this column, I'll teach you step-by-step study of UML design and notation based on Java application development. I'll introduce the basics of the UML framework and other modeling technologies in a logical (and possibly enjoyable) way, and you'll learn the real world by building a model of realistic examples. In the first section, we use the loan processing application as an example, starting with the build sequence diagram. Note that you are familiar with the Java language and have a basic knowledge of object-oriented methods and terminology. This column will briefly describe the object-oriented concept, but will not be discussed in depth.

About sequence diagrams

About Contributor Roles

The contributor role helps to discover and identify participants who can participate in a use case scenario. A participant can have multiple roles in one use case and multiple use cases. Currently, four different participant roles have been identified as UML enhancements or legacy roles: starting programs, servers, receivers, and agents. Because you can reflect the actor role in a sequence diagram, you should be familiar with their functionality.

A startup program is an external entity that sets the behavior of a system in an action. The launcher can request a service or generate an event. In a sequence diagram that displays participants, the launcher initiates a sequence in the action.

The external server role provides services to other roles. The server helps the system achieve its goals by providing functionality or information externally. Many external systems that contain the operating system are server roles. The server receives the message, but may not generate the message.

The recipient role receives information from the system. They provide services in a negative manner. As a result, they may not provide a value to the system, but they will want other participants to supply the value. An example of a receiver is a data warehouse or an external backup system. The receiver typically receives messages from objects in the system, but generally does not generate messages.

An agent is a participant who performs an action on behalf of another participant. An example of an agent is a video store employee who rents a tape on behalf of a customer.

UML does not exclude any special software development methods or processes; it only standardizes the format of the notation. However, many development methods combine UML. The Rational Unified Process (RUP) is one such approach; the other is functional-driven development (FDD). Because of its intuitive nature and versatility, UML sequence diagrams have become part of the front-end modeling activities of these processes. A sequence diagram is used to create a model of the following:

Use case scenarios

Protocols in the framework

Subsystem

Class

Method logic

The following is a brief description of each of these features.

Use case scenarios

For the sample application, we will use a sequence diagram to establish a model for a single use case scenario. A use case is a single task that is performed by an actor interacting with an application to achieve a specified goal. A contributor can be any end user, organization, or system that interacts with an application and is outside the application.

Protocols in the framework

The protocol is located between the framework and the interchangeable components called the collection body. Understanding the necessary interaction of the framework helps develop a new collection body. Sequence diagrams are typically used to record these interactions.

Related Article

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.