1. Standard Library - What We Have And What We Want¶
1.1. Observations on Standard Library¶
Note
This page is superseded by an RFC: https://github.com/plantuml/rfc-for-standard-plantuml-stdlib to solicit user input, but I’ll leave it here for reference/context.
Tip
The Observations, Requirements, and User Stories here allow us to create a new PlantUML Stdlib to empower the user per todoref
# |
Observation |
---|---|
OBV_DEFINE_DEPRECATED |
Macros use define and definelong which are deprecated per below |
OBV_DRY |
DRY (Don’t Repeat Yourself). The macros are repeated
|
OBV_CLOSE_COUPLING |
Macros are defined in the icon file for each icon
|
OBV_CONSISTENCY |
|
OBV_NO_SCALE |
There’s no way to scale the icons from the macros (the !define statements) except for Material.
|
OBV_NO_TEXTATTRIB |
There’s no way to change the size, colour etc… of the text description, label, technology fields |
OBV_3PARAMS_MIN |
At least 3 parameters are required and are rendered in the diagams
|
OBV_ALL_PUML |
Some libaries have an
|
Note
The following software principles should apply
Loose Coupling, High Cohesion (Consistency)
DRY (Don’t Repeat Yourself)
Open/Closed Principle (OCP) “open for extension” but “closed to modification” i.e. not have to change old macros to implement new behavior. New Macros are defined instead, that don’t break existing user code (SOLID).
1.2. Macro Definitions¶
Macros define the following
The superset of parameters
sprite
color
scale (material library only)
shape (Type 1 (e_type), 4 (_shape))
technology
description
label
Fixed
Text Size
Text Order
1.3. What a User Wants In A Standard Library¶
# |
Requirement |
---|---|
REQ_CONSISTENCY |
Consistency of macros, files, sizes |
REQ_ONLY_CARE |
Specify the things they care about
|
REQ_DECOUPLE |
Decoupling of the sprite (the image), from the decoration (text, shape, color, scale etc…)
|
REQ_CATEGORY |
Grouping of icons into categories.
|
REQ_CONTRIBUTE |
To be able to easily share / contribute
|
1.4. User Stories¶
# |
As a User, I want X, so I am empowered to do Y |
---|---|
US_HIGHLIGHT |
To highlight certain parts of a diagram
|
US_THEME |
To use, or create, a theme,
|
US_ICONSET |
To use, or create and contribute, an icon set easily
|