Skip to content

工具推荐

更新: 3/15/2025 字数: 0 字 时长: 0 分钟

介于我们可能要频繁的去思考风暴模型并且去写风暴模型的文档,因此这里推荐一个工具

PlantUML

Idea具有插件,具体使用方式可以去搜一下

这里主要分享一个风暴模型的组件库,基于Thibault Morin大佬的开源分享,原版感觉颜色有点太亮了,于是我调整成了深色系,你可以直接复制使用

这边直接粘贴出代码

PlantUML
!procedure EsEntity($shape, $stereotype, $id, $label="")  
  !if ($label != "")  
    $shape "$label" as $id <<$stereotype>>  
  !else  
    $shape $id <<$stereotype>>  
  !endif  
!endprocedure  
  
show stereotype  
  
skinparam defaultTextAlignment center  
skinparam wrapWidth 200  
skinparam maxMessageSize 150  
skinparam backgroundColor #1E1E1E  
skinparam defaultFontColor #E0E0E0  
  
' Setting default dark theme font colors  
!$FONT_COLOR = "#E0E0E0"  
!$FONT_SIZE_SM = 10  
  
skinparam Arrow {  
    Color $FONT_COLOR  
    FontColor $FONT_COLOR  
    FontSize $FONT_SIZE_SM  
}  
  
' Dark themed FacadeCommand - deep teal  
skinparam file<<FacadeCommand>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #2D5964  
}  
  
!procedure FacadeCommand($id, $label="")  
  EsEntity('file', 'FacadeCommand', $id, $label)  
!endprocedure  
  
' Dark themed Command - blue-gray  
skinparam file<<Command>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #3A5A65  
}  
  
!procedure Command($id, $label="")  
  EsEntity('file', 'Command', $id, $label)  
!endprocedure  
  
' Dark themed Result - dark taupe  
skinparam file<<Result>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #4F4F47  
}  
  
!procedure Result($id, $label="")  
  EsEntity('file', 'Result', $id, $label)  
!endprocedure  
  
' Dark themed Event - amber  
skinparam file<<Event>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #995F1E  
}  
  
!procedure Event($id, $label="")  
  EsEntity('file', 'Event', $id, $label)  
!endprocedure  
  
' Dark themed DomainEvent - dark orange  
skinparam file<<DomainEvent>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #B07333  
}  
  
!procedure DomainEvent($id, $label="")  
  EsEntity('file', 'DomainEvent', $id, $label)  
!endprocedure  
  
' Dark themed IntegrationEvent - tan  
skinparam file<<IntegrationEvent>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #A67C48  
}  
  
!procedure IntegrationEvent($id, $label="")  
  EsEntity('file', 'IntegrationEvent', $id, $label)  
!endprocedure  
  
' Dark themed Query - forest green  
skinparam file<<Query>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #2A6E2A  
}  
  
!procedure Query($id, $label="")  
  EsEntity('file', 'Query', $id, $label)  
!endprocedure  
  
' Dark themed ReadModel - emerald green  
skinparam file<<ReadModel>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #3A7D3A  
}  
  
!procedure ReadModel($id, $label="")  
  EsEntity('file', 'ReadModel', $id, $label)  
!endprocedure  
  
' Dark themed UserInterface - sage green  
skinparam file<<UserInterface>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #4A8C4A  
}  
  
!procedure UserInterface($id, $label="")  
  EsEntity('file', 'UserInterface', $id, $label)  
!endprocedure  
  
' Dark themed Aggregate - dark gold  
skinparam file<<Aggregate>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #9A9A3E  
}  
  
!procedure Aggregate($id, $label="")  
  EsEntity('file', 'Aggregate', $id, $label)  
!endprocedure  
  
' Dark themed Service - mustard  
skinparam file<<Service>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #8C8C28  
}  
  
!procedure Service($id, $label="")  
  EsEntity('file', 'Service', $id, $label)  
!endprocedure  
  
' Dark themed Policy - purple  
skinparam file<<Policy>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #654C87  
}  
  
!procedure Policy($id, $label="")  
  EsEntity('file', 'Policy', $id, $label)  
!endprocedure  
  
' Dark themed Saga - lavender  
skinparam file<<Saga>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #7A628F  
}  
  
!procedure Saga($id, $label="")  
  EsEntity('file', 'Saga', $id, $label)  
!endprocedure  
  
' Dark themed Process - light purple  
skinparam file<<Process>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #8F7A97  
}  
  
!procedure Process($id, $label="")  
  EsEntity('file', 'Process', $id, $label)  
!endprocedure  
  
' Dark themed Timer - slate gray  
skinparam file<<Timer>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #4F4F47  
}  
  
!procedure Timer($id, $label="")  
  EsEntity('file', 'Timer', $id, $label)  
!endprocedure  
  
' Dark themed Person - burgundy  
skinparam actor<<Person>> {  
    StereotypeFontSize 0  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #8B4F57  
}  
  
!procedure Person($id, $label="")  
  EsEntity('actor', 'Person', $id, $label)  
!endprocedure  
  
' Dark themed System - maroon  
skinparam file<<System>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor #8B4F57  
}  
  
!procedure System($id, $label="")  
  EsEntity('file', 'System', $id, $label)  
!endprocedure  
  
' Dark themed Comment - transparent  
skinparam file<<Comment>> {  
    StereotypeFontSize $FONT_SIZE_SM  
    shadowing false  
    FontColor $FONT_COLOR  
    BorderColor $FONT_COLOR  
    BackgroundColor transparent  
}  
  
!procedure Comment($id, $label="")  
  EsEntity('file', 'Comment', $id, $label)  
!endprocedure
本站访客数 人次      本站总访问量