I currently stumbled over the the concept of "ports" in UML component diagrams and I'm not entirely sure how they are supposed to be used. Sometimes, ports seem to be used generally as start of connectors. Sometimes, ports are only used as soon as a connector leaves/enters a bigger component. I've even seen examples where no ports at all are used (from UML 2.5):
In chapter 11.8.14.1 of the UML specification, a port is described as follows:
A Port is a property of an EncapsulatedClassifier that specifies a distinct interaction point between that EncapsulatedClassifier and its environment or between the (behavior of the) EncapsulatedClassifier and its internal parts. [...]
Wouldn't that mean that using ports is always mandatory? It also seems like there are quite the differences between UML 1 and UML 2 which are mixed in some cases. So my question is: As of today (UML 2), when should a port be used and when shouldn't it be used?