Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Component diagram dependency vs assembly

I'm having a hard time understanding the difference between dependency and assembly(ball and socket) in UML component diagram.

I googled a lot and only found this relative question : uml component diagram difference between assembly and interfaces with dependency

But I don't really understand the answer to that question, I specifically want to ask :

  1. What does he mean by "definition level" and "instance level" ? I understand that there is only one diagram, are there two ?
  2. Whether there are two or not, can you give me a valid example which has "dependency" and "assembly" and explain why the first was "dependency" and the second was "assembly" ?

Note that I'm not asking about any particular image I found on web, I'm asking here in general, Also I want Uml 2 :) .

I prefer examples because I don't understand all the words in UML, also I prefer these examples to be somewhat realistic , that is not "A and B" but for example "Order and Person".

My goal of the question is to draw the Component diagram for our graduation project that we'll give to the professor :) .

like image 796
niceman Avatar asked Oct 19 '16 06:10

niceman


People also ask

What is dependency in component diagram?

A dependency exists when the functioning of one element depends on the existence of another element. A dependency between two components in a component diagram results in an #include statement in the makefile for the dependent (or client) component.

What is Assembly in component diagram?

An Assembly connector bridges a component's required interface (Component1) with the provided interface of another component (Component2), typically in a Component diagram. Assembly. A Delegate connector defines the internal assembly of a component's external Ports and Interfaces, on a Component diagram.

What should be included in a component diagram?

Graphically, a component diagram is a collection of vertices and arcs and commonly contain components, interfaces and dependency, aggregation, constraint, generalization, association, and realization relationships. It may also contain notes and constraints.

What is the difference between component diagram and deployment diagram?

A deployment diagram shows components and artifacts in relation to where they are used in the deployed system. A component diagram defines the composition of components and artifacts in the system. Note: Deployment diagrams are distinct from deployment topologies, a different type of model.


1 Answers

A component is a piece of software. This is the class level (definition level). This piece of software may be installed on multiple machines, or maybe multiple instances may be running on the same machine. This is the instance level. If, in your case, each component is instantiated only once, then you only need one diagram, showing the instances. Otherwise, it would be good to have one diagram show the class level and one diagram show the instance level.

For example, there is a component called EmployeeProvider, which provides services to access an employee database. Suppose there is an instance running in the USA and one instance running in Europe. Suppose also that there is a report generator component, which only has one instance, which reads information from both employee databases. Below you can see two diagrams, one showing the class level (top) and one showing the instance level (bottom).

components

like image 87
www.admiraalit.nl Avatar answered Oct 07 '22 12:10

www.admiraalit.nl