The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

UML question

Hi all,

I've got a question on ports and interfaces, provided or required.

Let suppose to identify a component that interacts with the external environment providing a set of web services. Is there a port or a provided interface?

Reading the "OMG UML Specification" it seems that both are applicable. What's your opinion?

Could you also provide a port that isn't an interface and an interface that isn't a port?

Luigi Poderico Send private email
Tuesday, April 22, 2008
Ports are part of the Realtime profile in UML 2.
Interfaces are more general elements that integrate with ports.

(If my memory doesn't elude me,) Here's what I remember:
A Port uses one or more interfaces, where an interface is an active class, but mostly used to wrap data definitions.
What I consider important about a port is its dual 'hiding' aspect: if you program inside a capsule (UML 2 has another name for this - that's the older name of the class using the port) you dont need to know about the outside world.
Think about it this way: if you create a function in classic programming, what do you need to know about the calling functons? Using the port construct, you're (supposed to be) completely relieved from caring about your callers.

Still, I would suggest to use the interface construct, as it is easier understood. If you use ports, you will also have to use capsules and other constructs (a.k.a. you have to learn the whole UML 2 realtime profile) which creates much 'thinking' overhead for your programmers

(PS: I think capsules are called "Active Classes" in UML 2?).
Volker Kopetzky Send private email
Tuesday, April 22, 2008

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz