Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the components of UML modeling technology

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today Xiaobian to share with you what the components of UML modeling technology is related to knowledge points, detailed content, clear logic, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you have some gains after reading this article, let's learn about it together.

UML modeling technology consists of three parts: building blocks, rules, and common mechanisms.

I. Structural blocks

1. Building blocks are abstractions of representative components in the model.

Modeling element: A term in UML that is a basic physical element of a model.

Behavioral element: A verb in UML that is a dynamic part of the model and a behavior that spans time and space.

Grouping elements: Containers in UML that organize models and make them more structured.

Comment elements: Interpretations in UML, like comment statements in code, are used to describe models.

1.1 UML Modeling Technology Elements

class and object

interface

Active class

Use case

collaboration

component

node (node)

class and object

A class is an abstraction of a set of objects that have the same attributes, the same operations, the same relationships, and the same semantics

UML class is represented by a rectangle, it contains three areas, the top is the class name, the middle is the class attributes, the bottom is the class methods

An object is an instance of a class

interface

An interface is a set of service operations describing a class or artifact

Active class

The active class is actually a special class. The reason for referencing it is that you actually need some classes in your development that can initiate control activities.

An active class is a class whose objects have at least one process or thread that can initiate control activities

Use case

First proposed by the famous master Ivar Jacobson, use cases have become one of the most commonly used tools for requirements analysis in object-oriented software development.

A use-case instance is a series of actions performed in a system that will generate a value outcome visible to a particular performer. A use case defines a set of use case instances.

collaboration

Collaboration defines an interaction as a group of characters and other elements that work together to provide some collaborative behavior.

The implementation of a use case can be represented as a collaboration

component

In a real software system, there are many entities larger than "classes," such as a COM component, a DLL file, a JavaBeans, an execution file, and so on. To better represent them in UML models, components are introduced.

A component is a modular part of a system design that hides the internal implementation and provides a set of external interfaces. Components satisfying the same interface in the system can be freely replaced

node (node)

In order to effectively model the deployment structure, UML introduces the concept of nodes, which can be used to describe the actual PC, printer, server and other software running on the underlying hardware

A node is a physical element that exists at runtime and represents a computable resource, usually with at least storage space and processing power.

1.2 Behavioral elements

interaction: A collection of information exchanged between a group of objects working together to accomplish a task in a given context

The representation of interaction is simple, just a directed line with an operator name on it.

A state machine is a sequence of states that an object or interaction experiences in response to events during its lifecycle.

Draw the state as a rounded rectangle in the UML model and write the state name and its child states inside the rectangle. Let's take a look at the grouping elements of UML modeling technology.

1.3, grouping elements

For a medium-sized software system, it usually contains a large number of classes, so there will be a large number of structural things and behavioral things. In order to integrate them more effectively and generate simple or complex, macro or micro models, it is necessary to group them. In UML, packages are provided to accomplish this goal

1.4, comment element

Structural things are the main building blocks of the model, behavioral things complement the dynamic parts of the model, and grouping things is used to better organize the model, which seems to be complete. Annotated things are icing on the cake; they are used to add appropriate explanatory parts to UML models.

2. UML modeling technology relationship

2.1 Association relationship

An Association indicates that there is some semantically related relationship between two classes. Association relationships provide communication paths and are the most general and semantically weak of all relationships.

In UML, a solid line is used to represent an association

There are two special kinds of association relations: aggregation and combination.

Aggregation: Aggregation is a special form of association. Aggregation indicates that the relationship between classes is the relationship between the whole and the part

If it is found that the existence of a "part" class depends entirely on the existence of a "whole" class, then it should be described using a "composition" relationship.

Combination is a variant of aggregation, adding some important semantics. That is, in a composite relationship, an object is only a part of a composite at a time, and the whole is responsible for creating and destroying the parts, and when the whole is destroyed, the parts disappear

Polymerization is like cars and tires. Cars can be used when tires are broken. Combination is like a company and its subordinate departments. If the company goes bankrupt, the department will not exist!

2.2 Generalization, Implementation and Dependency

Generalization relations describe the relationship between a general thing and a particular kind of that thing, that is, the relationship between a parent class and a child class.

An implementation relationship is a relationship between an interface and the class or component that implements it. An interface is a collection of operations used to specify the services of a class or component.

There are two elements X, Y, and element Y is said to be dependent on element X if modifying the definition of element X may result in modifying the definition of the other element Y. The second component of UML modeling technology.

II. RULES

Naming: That is, naming things, relationships, and diagrams. Like any language, a name is an identifier.

Scope: Similar to the scope of a class.

Visibility: Public, Protected, Private, Package. Let's look at the common mechanics of UML modeling technology.

UML Common Mechanism

1. Specifications

Each part of the graphical representation is followed by a specification (also known as elaboration) that provides a textual description of the syntax and semantics of the building block. This idea also separates visual and textual views:

2. UML decoration and general partitioning

In order to better represent these details, UML also provides some modifiers, such as different visibility symbols, using italics to represent abstract classes.

UML Common Partitions:

1)The division between class and object: class is an abstraction, object is a concrete instance

2)Separation of interface and implementation: an interface is a declaration, a contract, and an entry point to a service; an implementation is a contract responsible for enforcing what the interface provides

3. UML Extension Mechanism

This part is not easy to describe and needs to be corrected.

Stereotype: In the actual modeling process, it may be necessary to define some domain-specific or system-specific building blocks

Tag values are used to add new features to things. Tag values are represented by strings of the form "{Tag Info}"

Constraints are mechanisms (both free text and OCL) used to add new semantics or change existing rules. Constraint notation is similar to tag-value notation in that it is represented as a bracketed string, except that it cannot be placed inside an element, but near the element concerned.

That's all for "What are the components of UML modeling technology?" Thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report