Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nikolay-martynov/eip-for-plantuml

Library of EIP sprites for PlantUML
https://github.com/nikolay-martynov/eip-for-plantuml

Last synced: 4 days ago
JSON representation

Library of EIP sprites for PlantUML

Awesome Lists containing this project

README

        

= EIP sprites for PlantUML

This is inspired by unofficial PlantUML EIP library
by _aheil_ https://github.com/aheil/EIP-PlantUML

The difference is that it was kind of small in terms of
number of shapes and very buggy.
Mix of C#, bash and lack of build automation did not
allow to effectively fix the problems.

Instead, this sprite library is based on
Enterprise Integration Pattern Shapes for Gliffy
https://github.com/comsysto/enterprise-integration-pattern-shapes-for-gliffy

It is a pure sprite library just as
standard Cloudinsight PlantUML sprites library
https://github.com/rabelenda/cicon-plantuml-sprites

The nice thing about sprite library vs macro/function library
is that you have much more control over appearance
when writing your diagram.

== Usage

First of all, include sprite library into your diagram:
```
!includeurl https://raw.githubusercontent.com/nikolay-martynov/eip-for-plantuml/master/dist/eip-for-plantuml.puml
```
Instead of master head you can specify any tag existing on GutHub. You can also
just download the file and add it to your project resources.

Once included, you can use any sprite from the library just as any other sprite.
You can read about sprites here: http://plantuml.com/sprite

The following example mimics splitter diagram from
https://www.enterpriseintegrationpatterns.com/patterns/messaging/Sequencer.html

image::https://nikolay-martynov.github.io/eip-for-plantuml/generated-examples/example.svg[]

```
@startuml
!includeurl https://raw.githubusercontent.com/nikolay-martynov/eip-for-plantuml/master/dist/eip-for-plantuml.puml
legend top
You can use sprite
anywhere you can use text.
Rectangle content is most
convenient.
endlegend
rectangle "<$EIP_MessageDouble>\nNew order" as newOrder
rectangle "<$EIP_Splitter>\nSplitter" as splitter
rectangle "<$EIP_MessageSingleGreen>\nOrder item 1" as item1
rectangle "<$EIP_MessageSingleOrange>\nOrder item 2" as item2
newOrder -> splitter
splitter -> item1
item1 -[hidden] item2
@enduml
```

All sprites come in multiple sizes determined by sprite name
suffix:

.Sprite sizes
|===
|Suffix|Size

|Small|50
||100
|Large|200
|===

image::https://nikolay-martynov.github.io/eip-for-plantuml/generated-examples/sizes.svg[]

== List of sprites

You can find description of each pattern here:
https://www.enterpriseintegrationpatterns.com/patterns/messaging

The following diagram shows all sprites available in the library
(you can click the image to copy name of sprite you need):

image::https://nikolay-martynov.github.io/eip-for-plantuml/generated-examples/all-sprites.svg[]

== Building

The project uses
link:https://github.com/cosminpolifronie/gradle-plantuml-plugin[PlantUML Gradle plugin]
to generate example images hosted on GitHub. This means you'll
need link:https://www.graphviz.org/[GraphViz] to generate these images.

Due to
link:https://github.com/cosminpolifronie/gradle-plantuml-plugin/issues/1[issue]
with PlantUML Gradle plugin, you'll have to run build twice:

```bash
./gradlew
./gradlew
```

This will generate link:dist/eip-for-plantuml.puml[]
as well as images in link:generated-examples[]
used for GitHub documentation. These have to be added/committed
to git.