欢迎光临散文网 会员登陆 & 注册

【菜鸟博士学习】制图利器PlantUml

2022-03-16 01:01 作者:菜鸟博士_杂货铺  | 我要投稿

【菜鸟博士学习】制图利器PlantUml

The tool of , PlantUml

一个画图的东西plantuml。对于一个有一定经验的程序员来说,能够快速的将脑子里的想法用流程图之类的图画出来,是非常重要的,这也是高级程序员的一个基本操作。画图有很多中工具,xmind,markdown,在线流程图工具,甚至自己的时间充裕的话可以自己开发一个画图工具,今天主要说一下plantuml。

A drawing tool called PLANTUML. It is very important for an experienced programmer to be able to quickly draw the ideas in his head in flowcharts and the like, which is a basic operation for advanced programmers. There are many tools for drawing, xmind, Markdown, online flowchart tools, and even develop your own drawing tool if you have time, today I want to talk about plantuml

plantuml是什么

What is plantuml

PlantUML是一个开源项目,支持快速绘制时序图,用例图,类图,对象图,组件图,思维导图,架构图,部署图等等。

PlantUML is an open source project that supports rapid drawing of sequence diagrams, use case diagrams, class diagrams, object diagrams, component diagrams, mind maps, architecture diagrams, deployment diagrams, and more.

如何使用

How to use it

思维导图类似markdown语法 @startmindmap * 中心 ** 主题1 ***: 主题1.1 未登录页进入,登录页进行登录; ***: 主题1.2 ** 主题2 ** 主题3 @endmindmap

demo:

演示:


  • 时序图 Sequence diagram

@startuml
用户 -> 认证中心: 登录操作
认证中心 -> 缓存: 存放(key=token+ip,value=token)token

用户 <- 认证中心 : 认证成功返回token
用户 -> 认证中心: 下次访问头部携带token认证
认证中心 <- 缓存: key=token+ip获取token
其他服务 <- 认证中心: 存在且校验成功则跳转到用户请求的其他服务
其他服务 -> 用户: 信息
@enduml

@ STARTUML user-> authentication center: Login operation
Authentication Center-> Cache: store (key = token + IP, value = token)

User <-authentication center: Authentication successfully returns token
User-> Authentication Center: next access header carrying token authentication
Authentication Center <-cache: key = token + IP get token
Other services <-authentication center: Existing and verified successfully then jump to other services requested by the user
Other services-> Users: information
@ ENDUML

demo:

演示:


  • 组件图 Component diagram

@startuml [First component] [Another component] as Comp2 component Comp3 component [Last\ncomponent] as Comp4 @enduml

demo:

演示:


这里仅仅放了三个图的示例,思维导图可以用来从产品的角度分析产品及业务的整体流程,时序图可以从技术的角度作为切入点,用来分析产品中的技术实现细节,组件图可以从技术的角度讲业务拆分成不同的模块进行开发,其他的图需要自己去官网查

Here are just three examples of mind maps that can be used to analyze the overall flow of a product and business from a product perspective, and a sequence diagram that can be used as a technical entry point, used to analyze the technical implementation details in the product, the component diagram can be divided into different business modules from the technical point of view for development, other diagrams need to go to the official website


【菜鸟博士学习】制图利器PlantUml的评论 (共 条)

分享到微博请遵守国家法律