UML Final Review question--2.6:package Diagram

Source: Internet
Author: User
Tags dashed line

Sixth package Diagram

Key concepts:

1. package Diagram (Diagram)

Consists of a number of packages and the relationships between the packages. A packet is a grouping mechanism that sets up some related classes as a package, forming a high cohesion , low-coupling class collection, which can be said to be a package equivalent to a subsystem.

2. Brief introduction:

Package diagrams is an important modeling tool for maintaining and describing the overall structure of the system, showing the dependencies between the modules and modules by describing the relationships between packages and packages. In the perspective of object-oriented software development, the class is obviously the basic building block to construct the whole system. But for the large-scale application system, its class will be hundreds of thousands, coupled with the "Criss cross-longitudinal" relationship, multiplicity, and so on, must be much more than people can deal with the complexity. This is also the introduction of the "package" of this grouping thing building blocks.

  The name of the package:

Each package must have a name that differs from the other package. The name of the model package is a string that can be divided into simple names and path names .

Simple name: refers to a package that contains only a simple name.

pathname : Refers to the name of the outer package that the package is located in as a prefix.

3, the role of package diagrams:

Package diagrams can describe the requirements, the design of the high-level overview, package diagram through the rational planning of their own functional response system, the structure of the system to logically modular decomposition ; Package diagrams is ultimately the way to organize the source code.

A package diagram can consist of any UML diagram, usually a UML use case diagram or a UML class diagram.

Packages are described as folders that can be used on any kind of UML diagram.

4, the relationship between UML:

Dependency: indicated by a dashed line with arrows pointing to the dependent package

5. UML Package Diagram Usage instructions

Modeling groups of elements

Each package should be composed of elements that are conceptually and semantically close to each other;

Identify the elements that should be marked as public for each package, but should be as few as possible;

The default "use" stereotype is generally used to consider explicit import stereotypes when mapping to programming;

Consider using generalization to model special packages.

When representing this model, note that only the elements that play a central role in each package are identified, as well as the document tag values for each package to make it clearer

Modeling the architecture

Modeling the Architecture (program layering) is a more meaningful use of UML package diagrams. Architecture is the core logical structure of a software system

Common architectural patterns include tiering,MVC, Pipelines, blackboards, microkernel, and so on, and in applications, layering and MVC

5, the common layer in the logical architecture of information system

UI, Application, Domain, Business Infrastructure, Technical Service, Foundation

6. MVC Architecture

The full name of MVC is the Model View controller, which is the abbreviation for models- View- Controllers (Controller) , a software design paradigm, Used to organize code with a method of separating the business logic and data display, the assumption is that if the business logic is aggregated into a part, and the interface and user interaction around the data can be improved and customized without rewriting the business logic MVC is uniquely developed to map the traditional input, The processing and output functions are in the structure of a logical graphical user interface.

7, MVC layered Introduction

MVC is the acronym for three words, which are model, view, and Controller (control).

This model argues that the program, whether simple or complex, can be divided into three layers from a structural perspective.

1) The topmost layer is the "view layer"that is directed towards the end user. It is provided to the user's operating interface, is the shell of the program.

2) The bottom layer is the core "Data layer" (Model), which is the data or information that the program needs to manipulate.

3) The middle layer, is the "Control Layer" (Controller), which is responsible for the user from the "view layer" input instructions, select the "Data layer" in the data, and then the corresponding operation, resulting in the final result.

Draw points:

Specific method: http://blog.csdn.net/cjr15233661143/article/details/8452603

http://blog.csdn.net/xujiaolf/article/details/8557686

Http://www.ruanyifeng.com/blog/2007/11/mvc.html (Introduction to MVC architecture)

The introduction of package diagrams on the Internet is not as detailed as other diagram explanations, find a few can be used as a reference, but the question is the MVC architecture, so understand the simple concept of the package, and then see the last one in the introduction of MVC can draw!

Precautions:

I would like to implement this scenario, use the MVC pattern to generate a hierarchy, you can use a package diagram to represent the hierarchy, and the elements inside the scene to fill in the package.

There are 3 packages, one is called M (model), one is called V (view), one is called C (Controller).

Add everything involved in each package to the package.

1, the elements of package diagrams m are all from the domain model inside.

2, temporary variables belong to the control layer, the action of the naming rule is to add an action or controller behind the action, a use case on a control.

3 . The interface appearing in the use case belongs to V

A package diagram of a use case is to fill in the elements of the domain model of the use case into the M (domain layer) and C (Controller) packages, then give the interface a name and then write it in the V (UI) package. (The teacher did not say to draw the relationship between the package, his own drawings are not painted relations, so simply do not draw it)

If you have external support resources, write them in the foundation package.

Answers to questions:

UML Final Review question--2.6:package Diagram

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.