Difference between a subsystem and a component

孤人 提交于 2020-05-10 03:51:48

问题


I would like to ask what is the difference between a subsystem and a component in the UML sense?


回答1:


I have to agree with Preet, but practically, a subsystem is larger than a component. I use components for libraries (either bought, pillaged, or built) and subsystems for a part of the whole system that performs a given integrated function. For example, in a blood processing device, the centrifuge driver and control would be a component. The integrated blood suction regulation (which includes safety mechanisms, motor control, user control, and communications) would be a subsystem.




回答2:


Before UML 2.0 I could perfectly see a <<subsystem>> as a design-time <<component>>, which would finally become a <<component>>. The UML 1.4 defines component as "A modular, deployable, and replaceable part of a system that encapsulates implementation and exposes a set of interfaces. A component is typically specified by one or more classifiers (e.g., implementation classes) that reside on it, and may be implemented by one or more artifacts (e.g., binary, executable, or script files)."

After the aforementioned "fuzziness" was introduced to the UML (in UML 2.0), I am more inclined to use <<subsystem>> as a larger <<component>>, and see both of them as replaceable and reusable constituents of a system.




回答3:


From IBM developerWorks - UML basics: The component diagram

The UML 2 specification is quite vague on how a subsystem is different from a component. The specification does not treat a component or a subsystem any differently from a modeling perspective. Compared with UML 1.x, this UML 2 modeling ambiguity is new. But there's a reason. In UML 1.x, a subsystem was considered a package, and this package notation was confusing to many UML practitioners; hence UML 2 aligned subsystems as a specialized component, since this is how most UML 1.x users understood it. This change did introduce fuzziness into the picture, but this fuzziness is more of a reflection of reality versus a mistake in the UML 2 specification.

So in short none.




回答4:


In UML models, subsystems are a type of stereotyped component that represent independent, behavioral units in a system. Subsystems are used in class, component, and use-case diagrams to represent large-scale components in the system that you are modeling.

You can model an entire system as a hierarchy of subsystems. You can also define the behavior that each subsystem represents by specifying interfaces to the subsystems and the operations that support the interfaces.

In diagrams, compartments display information about the attributes, operations, provided interfaces, required interfaces, realizations, and internal structure of the subsystem.

Typically, a subsystem has a name that describes its contents and role in the system.

As the following figure illustrates, a subsystem is displayed as a rectangle that contains the name of the subsystem. It also contains the keyword «Subsystem» and the subsystem icon.

From: IBM Knowledge Center



来源:https://stackoverflow.com/questions/2777191/difference-between-a-subsystem-and-a-component

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!