Friday, 10 November 2023

Designing with PlantUML: Creating and Defining Interfaces in Component Diagrams

Interfaces in component diagrams show how components are wired together and interact with each other. Interfaces are defined using brackets ()

 

Example

() "My Interface"

 

You can also use the interface keyword to define the interface.

 

Example

interface "My Interface"

 

You can define an alias to the interface using ‘as’ keyword.

 

() "My Interface" as MI

interface "My Interface" as MI


 

interfaces.txt

@startuml

[Order]
[Customer]
[Product]

interface ProductCode
interface CustomerDetails

[Order] -- CustomerDetails
CustomerDetails --> [Customer]

[Order] -- ProductCode
ProductCode --> [Product]

@enduml

Above snippet generate below diagram.



 

Previous                                                    Next                                                    Home

No comments:

Post a Comment