When to use ports in your UML component diagram?

92 Views Asked by At

I'm trying to understand some UML diagrams, and I was reading and drawing some different diagrams, until I reached the component diagram.

I was following some online tutorials, like this and this.

Just like the question's title says, I don't understand when to use a port in a component, both websites above seems to be answering how to use port and providing some general definitions like:

A port is often used to help expose required and provided interfaces of a component.

However no one is giving a good answer for when to use it.

What makes me ask this question is that, many examples I stumbled upon sometimes uses ports in their components and some times not.

Are there characteristics or rules that may help define whether to use a port or not ?

I'm pretty new to UML and design in general so please don't judge my ignorance in this area.

0

There are 0 best solutions below