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

Example Analysis of UML Building blocks in UML composition

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Editor to share with you the example analysis of UML building blocks in the composition of UML. I hope you will get something after reading this article. Let's discuss it together.

UML composition

UML consists of three parts (building blocks, rules, and common mechanisms), and the relationship is shown in the following figure:

1. UML building blocks

1. The building block is the abstraction of the representative components in the model.

Modeling element: a noun in UML, which is the basic physical element of the model.

Behavior element: a verb in UML, which is a dynamic part of the model and a behavior that spans time and space.

Grouping elements: containers in UML that are used to organize models and make them more structured.

Comment element: the interpretation part of UML, like the comment statements in the code, is used to describe the model.

1.1. Modeling elements

Classes (class) and objects (object)

Interface (interface)

Active class (activeclass)

Use case (usecase)

Collaboration (collaboration)

Component (component)

Node (node)

Classes (class) and objects (object) in the UML building block

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

The class in UML is represented by a rectangle, which contains three areas, with the name of the class at the top, the properties of the class in the middle, and the method of the class at the bottom.

The object is an instance of the class (objectisaInstanceofClass)

Interfaces in UML building blocks (interface)

An interface is a set of service operations that describe a class or component

Active class (activeclass)

The active class is actually a special class. The reason for referencing it is actually that some classes are needed to initiate control activities in development.

An active class is a class whose object has at least one process or thread and can start control activities.

Use case (usecase)

Use case was first put forward by the famous master IvarJacobson, and now it has become the most commonly used tool for requirement analysis in object-oriented software development.

A use case example is a series of actions performed in the system that will produce value results visible to a particular executor. A use case defines a set of use case instances.

Collaboration in UML building blocks (collaboration)

Collaboration defines an interaction, which is a group of roles and other elements that work together to provide a collaborative behavior.

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

Components in UML building blocks (component)

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

Component is a modular part of system design, which hides the internal implementation and provides a set of external interfaces. Components that meet the same interface in the system can be replaced freely

Nodes in UML building blocks (node)

In order to model the structure of deployment effectively, UML introduces the concept of node, which can be used to describe the basic hardware on which the actual PC, printer, server and other software runs.

A node is a physical element that exists at run time and represents a computable resource that usually has at least storage space and processing power.

1.2. Behavioral elements

Interaction: a collection of information exchanged between a group of objects that accomplish a task together in a particular context

The representation of interaction is simple, which is a directed line with the operation name on it.

State machine (statemachine): the sequence of states experienced by an object or interaction in response to events during the life cycle

Draw the state as a rounded rectangle in the UML model, and write the state name and its child state inside the rectangle

1.3, grouping elements

For a medium and large 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, it is necessary to group them into simple or complex, macro or micro models. In UML, "Package" is provided to accomplish this goal.

1.4. Comment elements

Structural things are the main building blocks of the model, behavioral things supplement the dynamic part of the model, grouping things but used to better organize the model, seems to be very complete. Annotations, on the other hand, are used to add appropriate interpretations to the UML model.

After reading this article, I believe you have some understanding of "sample Analysis of UML Building blocks in UML composition". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

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