diff --git a/README.md b/README.md index db9bf1096..9186c3126 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,89 @@ Example of usage: This example renders the following image: ![Example](http://www.plantuml.com/plantuml/png/ZOvFIyGm4CNl-HIrfowupMLFdbQgjnKN_vnbcWxRm6GICXDalxtPWaKHnTDxCypxpTkBGjOIg1bsR_U40Ld5N7bsL2PiPjKaDzPcUEzFNkSo5i7i8YkozYu6cmZuaj-AJkH7E-osnylgzU5W0uXYjfKyr0HunjodUclC4RD4xj8Yj-H1hfls02DIMyrZKXyPgBb3STalKxinAwHpd-v7z0NTp97YwVm7wFaiYg6JHVxxtJmXVI-yjlWTyQNEnkoHfnBe0m00) +## Edgy Enterprise Design +Edgy is an Open Source tool for collaborative Enterprise Design. The library is an adaption of the EDGY Tools for PlantUML usage. + +The Sprites are based on the [Enterprise Design with EDGY](https://www.enterprise.design/). They'll be rendered as SVG sprites, so you need a quite actual PlantUML distribution. + +Use it by including the file that contains the sprite, eg: `!include `. +The library is not complete yet, but it's a good start. + +In general, the procedures for elements and facets do have the form of +``` +$elementorfacet("label", alias, lighterColor) +``` +* ```"label"``` is the name of the element or facet. It is mandatory. +* ```alias``` is used for linking elements and facets. It is optional. +* ```lighterColor``` is used as a boolean value (!) to use a lighter color for the element or facet. It is optional. + * Facets are drawn with lighter colors than Elements as default. + * ```0``` is false. Any other value is true. Or use ```%true()``` and ```%false()``` (see [Boolean expression in Preprocessing](https://plantuml.com/de/preprocessing#55eb000153a81c72)). + +### Facets +Facets do have the edgy facet name followed with ```Facet``` as tail, to distinguish them from elements. +The following facets are implemented: ```$baseFacet```,```$identityFacet```,```$brandFacet```,```$experienceFacet```,```$productFacet```,```$architectureFacet```,```$organisationFacet``` + +### Elements +Elements do have the edgy element name. +The following elements are implemented: +Base: ```$people```,```$outcome```,```$activity```,```$object``` +Identity: ```$purpose```,```$story```,```$content``` +Brand: ```$brand``` +Experience: ```$task```,```$channel```,```$journey``` +Product: ```$product``` +Architecture: ```$capability```,```$asset```,```$process``` +Organisation: ```$organisation``` + +Elements can be nested into facets: +``` +$architectureFacet("Architecture") { + $capability("Capability") +} +``` + +However, it is also possible to nest elements if needed: +``` +$capability("Customer Interaction") { + $capability("Passenger Services", pass, 1) { + $capability("Passenger Information", info) + } +} +``` + +### Links +Links do have the form of +``` +$link(fromAlias, toAlias, "label") +``` +* ```fromAlias``` is the starting element or facet. It is mandatory. +* ```toAlias``` is the target element or facet. It is mandatory. +* ```"label""``` is a label written on the connection. This is optional. + +There are only three sort of links: +* ```$link``` is a unidirectional link between elements or facets. +* ```$flow``` is a directed flow between elements or facets. +* ```$tree``` is a hierarchical representation of elements as a tree relationship. + +Generally, all links do have the possibility to give the rendere a hint in which direction the link should be drawn. This is done by adding ```Up```, ```Down```, ```Left```, ```Right``` as a tail to the link name (e.g. ```$linkUp```, ```$linkDown```, ```$linkLeft```, ```$linkRight```). + +### Concrete example of usage: +``` +@startuml +!include + +$identityFacet("This is the Identity facet", identity) { + $content(" This is the Content element", content) + $purpose("This is the Purpose element", purpose) + $story("This is the Story element", story) +} + +$link(content, purpose) +$link(content, story) +$link(purpose, story) + +@enduml +``` + ## Elastic library The Elastic library consists of [Elastic](https://www.elastic.co) icons. diff --git a/edgy/INFO b/edgy/INFO new file mode 100644 index 000000000..9c936ccbe --- /dev/null +++ b/edgy/INFO @@ -0,0 +1,2 @@ +VERSION=0.5.0 +SOURCE=https://github.com/boessu/plantuml-stdlib diff --git a/edgy/edgy.puml b/edgy/edgy.puml new file mode 100644 index 000000000..40b08b00e --- /dev/null +++ b/edgy/edgy.puml @@ -0,0 +1,304 @@ +@startuml +''''''''''''''''''''''''''''''''''''' +'''''' Edgy Enterprise Design ''''''' +''''''''''''''''''''''''''''''''''''' + +'''''' Basic colors ''''''' +!$BASE="#d9d9d9" +!$BASE_LIGHT="#e6e6e6" +!$IDENTITY="#4dff9a" +!$IDENTITY_LIGHT="#80ffb7" +!$ARCHITECTURE="#8caeff" +!$ARCHITECTURE_LIGHT="#a6c0ff" +!$EXPERIENCE="#ff73a4" +!$EXPERIENCE_LIGHT="#ff99bd" +!$ORGANISATION="#4de2ff" +!$ORGANISATION_LIGHT="#80eaff" +!$PRODUCT="#db73ff" +!$PRODUCT_LIGHT="#e599ff" +!$BRAND="#ffc44d" +!$BRAND_LIGHT="#ffd580" + +skinparam StereotypeAlignment left + +skinparam rectangle<> { + RoundCorner 25 + BorderColor $BASE_LIGHT +} + +'''''' basic visual procedures '''''' +' procedures to build skinparam for facets +!procedure $facetSkinParam($stereotype, $color) +skinparam rectangle<<$stereotype>> { + Shadowing false + StereotypeFontSize 0 + RoundCorner 50 + FontColor #444444 + BorderColor $color + BorderStyle dashed + BorderThickness 3 +} +!endprocedure + +' sprite procedures +!procedure $activitysprite($name, $linecolor, $fillcolor) +sprite $b##$name##Icon + + + $name + +!endprocedure +!procedure $outcomesprite($name, $linecolor, $fillcolor) +sprite $b##$name##Icon + + + $name + +!endprocedure +!procedure $objectsprite($name, $linecolor, $fillcolor) +sprite $b##$name##Icon + + + $name + +!endprocedure + +'''''''''''''''''''''''''''''''''''''''''''''''''' +'''''' Edgy Sprites & skinparams for Facets '''''' +' Base +$facetSkinParam("base", $BASE) +$activitysprite("Activity", "#262626", "#fff") +$outcomesprite("Outcome", "#262626", "#fff") +$objectsprite("Object", "#262626", "#fff") +sprite $bPeopleIcon + + + + + People + + +' Experience +$facetSkinParam("experience", $EXPERIENCE) +$activitysprite("Journey", "#fff", "#ff005a") +$outcomesprite("Task", "#fff", "#ff005a") +$objectsprite("Channel", "#fff", "#ff005a") +sprite $bExperienceLogo + + + + +' Identity +$facetSkinParam("identity", $IDENTITY) +$activitysprite("Story", "#fff", "#00e664") +$outcomesprite("Content", "#fff", "#00e664") +$objectsprite("Purpose", "#fff", "#00e664") +sprite $bIdentityLogo + + + + + + +' Architecture +$facetSkinParam("architecture", $ARCHITECTURE) +$activitysprite("Process", "#fff", "#2664ff") +$outcomesprite("Capability", "#fff", "#2664ff") +$objectsprite("Asset", "#fff", "#2664ff") +sprite $bArchitectureLogo + + + + +' Brand +$facetSkinParam("brand", $BRAND) +$objectsprite("Brand", "#fff", "orange") +sprite $bBrandLogo + + + + + +' Organisation +$facetSkinParam("organisation", $ORGANISATION) +$objectsprite("Organisation", "#fff", "#00caf4") +sprite $bOrganisationLogo + + + + +' Product +$facetSkinParam("product", $PRODUCT) +$objectsprite("Product", "#fff", "#cf00ff") +sprite $bProductLogo + + + + + +''''''''''''''''''''''''''''''''''''''''''''''''''''' +'''''' procedures to build facets and elements '''''' +' element and facet builder +!procedure $elementBuilder($name, $label, $alias, $islight, $fillcolor, $fillcolorlight, $facet=0, $noSprite=0) + !if ($islight) + !$filling=$fillcolorlight + !else + !$filling=$fillcolor + !endif + !if ($alias=="") + !$id="" + !else + !$id="as " + $alias + !endif + !if ($facet) + !$stereotype=%lower($name) + !if ($noSprite) + !$sprite = "" + !else + !$sprite = "<<$b"+$name+"Logo>>" + !endif + !else + !$stereotype=element + !if ($noSprite) + !$sprite = "" + !else + !$sprite = "<<$b"+$name+"Icon*0.5>>" + !endif + !endif + rectangle "$label" $sprite <<$stereotype>> $id $filling +!endprocedure + +!procedure $facetBuilder($name,$fillcolor,$alias,$label) + !if ($alias=="") + rectangle "==$label" <<$b##$name##Logo>> <<%lower($name)>> $fillcolor + !else + rectangle "==$label" <<$b##$name##Logo>> <<%lower($name)>> as $alias $fillcolor + !endif +!endprocedure + +' base elements +!procedure $baseFacet($label, $alias="", $islight=1) + $elementBuilder("Base", $label, $alias, $islight, $BASE, $BASE_LIGHT, 1, 1) +!endprocedure +!procedure $people($label, $alias="", $islight=0) + $elementBuilder("People", $label, $alias, $islight, $BASE, $BASE_LIGHT) +!endprocedure +!procedure $outcome($label, $alias="", $islight=0) + $elementBuilder("Outcome", $label, $alias, $islight, $BASE, $BASE_LIGHT) +!endprocedure +!procedure $activity($label, $alias="", $islight=0) + $elementBuilder("Activity", $label, $alias, $islight, $BASE, $BASE_LIGHT) +!endprocedure +!procedure $object($label, $alias="", $islight=0) + $elementBuilder("Object", $label, $alias, $islight, $BASE, $BASE_LIGHT) +!endprocedure + +!procedure $identityFacet($label, $alias="", $islight=1) + $elementBuilder("Identity", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT, 1, 0) +!endprocedure +!procedure $purpose($label, $alias="", $islight=0) + $elementBuilder("Purpose", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT) +!endprocedure +!procedure $story($label, $alias="", $islight=0) + $elementBuilder("Story", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT) +!endprocedure +!procedure $content($label, $alias="", $islight=0) + $elementBuilder("Content", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT) +!endprocedure + +!procedure $brandFacet($label, $alias="", $islight=1) + $elementBuilder("Brand", $label, $alias, $islight, $BRAND, $BRAND_LIGHT, 1, 0) +!endprocedure +!procedure $brand($label, $alias="", $islight=0) + $elementBuilder("Brand", $label, $alias, $islight, $BRAND, $BRAND_LIGHT) +!endprocedure + +!procedure $experienceFacet($label, $alias="", $islight=1) + $elementBuilder("Experience", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT, 1, 0) +!endprocedure +!procedure $task($label, $alias="", $islight=0) + $elementBuilder("Task", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT) +!endprocedure +!procedure $channel($label, $alias="", $islight=0) + $elementBuilder("Channel", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT) +!endprocedure +!procedure $journey($label, $alias="", $islight=0) + $elementBuilder("Journey", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT) +!endprocedure + +!procedure $productFacet($label, $alias="", $islight=1) + $elementBuilder("Product", $label, $alias, $islight, $PRODUCT, $PRODUCT_LIGHT, 1, 0) +!endprocedure +!procedure $product($label, $alias="", $islight=0) + $elementBuilder("Product", $label, $alias, $islight, $PRODUCT, $PRODUCT_LIGHT) +!endprocedure + +!procedure $architectureFacet($label, $alias="", $islight=1) + $elementBuilder("Architecture", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT, 1, 0) +!endprocedure +!procedure $capability($label, $alias="", $islight=0) + $elementBuilder("Capability", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT) +!endprocedure +!procedure $asset($label, $alias="", $islight=0) + $elementBuilder("Asset", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT) +!endprocedure +!procedure process($label, $alias="", $islight=0) + $elementBuilder("Process", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT) +!endprocedure + +!procedure $organisationFacet($label, $alias="", $islight=1) + $elementBuilder("Organisation", $label, $alias, $islight, $ORGANISATION, $ORGANISATION_LIGHT, 1, 0) +!endprocedure +!procedure $organisation($label, $alias="", $islight=0) + $elementBuilder("Organisation", $label, $alias, $islight, $ORGANISATION, $ORGANISATION_LIGHT) +!endprocedure + +''''''''''''''''''''''''''''''''''''''' +'''''' procedures to build links '''''' +!procedure $link($from, $to, $label="") + $from -- $to : "$label" +!endprocedure +!procedure $linkUp($from, $to, $label="") + $from -up- $to : "$label" +!endprocedure +!procedure $linkDown($from, $to, $label="") + $from -down- $to : "$label" +!endprocedure +!procedure $linkLeft($from, $to, $label="") + $from -left- $to : "$label" +!endprocedure +!procedure $linkRight($from, $to, $label="") + $from -right- $to : "$label" +!endprocedure +!procedure $flow($from, $to, $label="") + $from --> $to : "$label" +!endprocedure +!procedure $flowUp($from, $to, $label="") + $from -up-> $to : "$label" +!endprocedure +!procedure $flowDown($from, $to, $label="") + $from -down-> $to : "$label" +!endprocedure +!procedure $flowLeft($from, $to, $label="") + $from -left-> $to : "$label" +!endprocedure +!procedure $flowRight($from, $to, $label="") + $from -right-> $to : "$label" +!endprocedure +!procedure $tree($from, $to, $label="") + $from --* $to : "$label" +!endprocedure +!procedure $treeUp($from, $to, $label="") + $from -up-* $to : "$label" +!endprocedure +!procedure $treeDown($from, $to, $label="") + $from -down-* $to : "$label" +!endprocedure +!procedure $treeLeft($from, $to, $label="") + $from -left-* $to : "$label" +!endprocedure +!procedure $treeRight($from, $to, $label="") + $from -right-* $to : "$label" +!endprocedure + +@enduml \ No newline at end of file