Are partial lollipop for component diagrams supported?

+1 vote
asked Mar 20, 2014 in Wanted features by philippe.lavoie (160 points)

I'm wondering interface dependencies should be expressed with PlantUML. The partial lollipop along with ports sweem to be the current answer, but I don't know how to do it with PlantUML. Any advice?

You can look at http://www.uml-diagrams.org/component-diagrams.html for examples of what I mean.

Thanks for your hard work.

1 Answer

+1 vote
answered Mar 20, 2014 by plantuml (294,960 points)
selected Mar 21, 2014 by philippe.lavoie
 
Best answer

Hello,

The support of lollipop and port is (still) really limited within PlantUML.

Here is an undocumented example that is working right now:

@startuml
actor foo1
actor foo2
foo1 <-0-> foo2
foo1 <-(0)-> foo2
 
(ac1) -le(0)-> left1
ac1 -ri0-> right1
ac1 .up(0).> up1
ac1 ~up(0)~> up2
ac1 -do(0)-> down1
ac1 -do(0)-> down2
 
actor1 -0)- actor2
 
component comp1
component comp2
comp1 *-0)-+ comp2
[comp3] <-->> [comp4]
@enduml


We are still working on this, so any input on users' need is welcome.

Regard,
 

commented Mar 20, 2014 by philippe.lavoie (160 points)
Thanks for the information. I tried to use the above information, however it gets cluttered very easilly. Especially if I want to have many interfaces to the same component.

The following is the best I could do. I would have like to make it explicit that ConfigurationManager implements the Configuration interface that is required by the three other components. I also would have liked to add more interfaces to the DataManager, i.e. split CRUD into Create, Read, Update and Delete. However, that becomes unreadable very fast. I don't know how to tell PlantUML that an interface is only to the left and increase the height of the box when more than one interface is implemented.


@startuml

component DataManager
component DataAccessManager
component CacheManager
component ConfigurationManager

interface CRUD
interface Configuration

CRUD - DataManager

DataAccessManager <- DataManager   
DataManager -->  CacheManager

DataAccessManager ..> Configuration
DataManager ..> Configuration
CacheManager ..> Configuration

Configuration - ConfigurationManager

@enduml


I think that from a usage perspective, the lollipop needs to be viewed as a independent entity so that it can aggregate multiple callers. See the section on "Assembly Connector" inside http://www.uml-diagrams.org/component-diagrams.html.

Thanks for the prompt answer earlier and for the great work on PlantUML.
commented Mar 20, 2014 by philippe.lavoie (160 points)
Just thought from a usability perspective, that sometimes it's important to only note a dependency on an interface and not necessarily link to anything. See http://www.sparxsystems.com/resources/uml2_tutorial/uml2_componentdiagram.html for what I mean (at the end of the tutorial)

In UML1, I think I'd do it with linking to an interface through dotted lines. PlantUML seem to partially support UML2 for this type of information.

Cheers
commented Feb 25, 2018 by Anthony-Gaudino (5,720 points)
This has been implemented on class diagrams, see http://forum.plantuml.net/2259
...