Visual studio-sequence Diagram

Source: Internet
Author: User

UML Design Via Visual studio-sequence Diagram

This article focuses on designing a time series diagram in Visual Studio, which reads as follows:

    1. When to use time series diagrams
    2. Timing Diagram Elements Introduction
    3. Conditions, the use of loops in time series diagrams
    4. Generate sequence diagrams directly from code
First, when to use time series diagram

When you want to see the behavior of several objects within a single use case, you should use time series diagrams, which are used to demonstrate collaboration between objects (Martin Fowler).

Second, time series diagram element Introduction

First, a diagram.

The basic elements of a time series diagram are shown: Actor, Lifeline, message, return, self-invocation.

One thing to note is that the participant people:people, this is represented by the class, and the format is Name:class. If you use a class to represent the contributor name can be omitted, but the colon must be persisted. If you see someone drawing a time series diagram and find that the participant contains a colon, it means that this is a class. The other may be an ordinary abstract participant.

Third, the circulation, the condition in the time series diagram the use 1, the condition business scene, the user must inquire own bank card the expense record, first accesses the Bankservice,bankservice when receives the query request to first accesses the Securityservice to authenticate the user identity, If the identity is legitimate, directly query the consumption record, otherwise, directly return.

By right-clicking on the query message line-surround with-alt to complete the operation

2. Circulation

Business scenario, the user may have multiple cards and need to access multiple dataservice for querying.

Complete the operation by right-clicking on the-surround with-loop on the query message line

Iv. generating sequence diagrams directly from code

Sample code

How to generate: Right-click on a method.

Generated time series diagram

It's very handy to generate time-series diagrams from code. This facilitates the interpretation of your code logic like outsiders, but only if the code is to be introduced, and the encapsulation is complete.

These are the most common areas of the time series used in their work. VS, it's very handy to do it.

Visual studio-sequence Diagram

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.