Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ふんわり使うPlantUML

 ふんわり使うPlantUML

PlantUML を使って、ふんわりと図を描くはなし。

PHPerKaigi 2023 (2023-03-24)
https://phperkaigi.jp/2023/

Norio Suzuki

March 24, 2023
Tweet

More Decks by Norio Suzuki

Other Decks in Programming

Transcript

  1. ΞʔΩςΫνϟਤͷྫᶃ @startuml (User) -> (API) (API) -> (DB) ' Queue

    (API) --> (Queue) (Queue) <-- (Subscriber) (Subscriber) -> (MTA) @enduml
  2. ΞʔΩςΫνϟਤͷྫᶄ @startuml actor User queue Queue database DB (User) ->

    (API): POST /register (API) -> (DB): Save ' Queue (API) --> (Queue): Publish Message (Queue) <-- (Subscriber): Subscribe Message (Subscriber) -> (MTA): Email @enduml
  3. ΞʔΩςΫνϟਤͷྫᶅ @startuml !include <awslib/AWSCommon> !include <awslib/AWSSimplified> !include <awslib/General/Users> !include <awslib/Database/Aurora>

    !include <awslib/ApplicationIntegration/SimpleQueueService> !include <awslib/BusinessApplications/SimpleEmailService> Users(User, "User", "tech") Aurora(DB, "DB", "tech") SimpleQueueService("Queue", "Queue", "tech") SimpleEmailService("MTA", "MTA", "tech") (User) -> (API): POST /register (API) -> (DB): Save ' Queue (API) --> (Queue): Publish Message (Queue) <-- (Subscriber): Subscribe Message (Subscriber) -> (MTA): Email @enduml
  4. γʔέϯεਤͷྫᶃ @startuml User -> API: POST /save API -> API:

    Create Message API -> Queue: Publish Message API <-- Queue: OK User <-- API: OK == Subscriber Process == Queue <- Subscriber: Fetch Message Queue --> Subscriber: Message Subscriber -> DB: Save Subscriber <-- DB: OK @enduml
  5. ιʔείʔυɾϦʔσΟϯάͷྫ @startuml skinparam usecase<<DEPRECATED>> { backgroundColor #fcc } skinparam usecase<<RENEW>>

    { backgroundColor #cfc } ' command ܥ rectangle "terminate Command" as terminateCommand usecase "TerminationService::exec()" as terminateService ' admin ܥ rectangle "POST /admin/delete API" as adminDeleteApi usecase "Admin\DeleteService::delete()" as adminDeleteService ' ࡟আຊମ usecase "Deprecated\DeleteService::delete()" as deleteServiceDeprecated <<DEPRECATED>> usecase "DeleteService::delete()" as deleteService <<RENEW>> usecase "෇Ճ৘ใͷ࡟আॲཧ" as deleteInfo <<RENEW>> ' unregister ܥ rectangle "POST /unregister API" as unregisterApi usecase "UnregisterService::unregister()" as unregisterService ' command ܥ (terminateCommand) --> (terminateService) (terminateService) --> (deleteServiceDeprecated) ' admin ܥ (adminDeleteApi) --> (adminDeleteService) (adminDeleteService) --> (deleteServiceDeprecated) (deleteServiceDeprecated) --> (deleteService) ' unregister ܥ (unregisterApi) ---> (unregisterService) (unregisterService) --> (deleteService) ' RENEW (deleteService) --> (deleteInfo) @enduml
  6. ໼ҹͷํ޲Λௐ੔ @startuml (A) -r-> (B) (A) -d-> (C) (A) -l->

    (D) (A) -u-> (E) @enduml SJHIUMFGU EPXOVQ
  7. άϧʔϐϯάͱIJEEFOϥΠϯ @startuml rectangle Group { (B) (C) (B) -d[hidden]- (C)

    } (A) -> (B) (A) -> (C) @enduml E͸EPXOͷ͜ͱ ଞͷํ޲ࢦఆ΋Ͱ͖Δ
  8. ςʔϚʢTQBDFMBCʣ @startuml !theme spacelab (A) -- (B) (A) -- (C)

    @enduml ૊ΈࠐΈͷςʔϚͷҰཡ͸ 
 IUUQTQMBOUVNMDPNKBUIFNF
  9. ϥΠϒϥϦΛ࢖͏ @startuml !include <awslib/AWSCommon> !include <awslib/AWSSimplified> !include <awslib/General/Users> !include <awslib/Database/Aurora>

    !include <awslib/Database/DynamoDB> Users(A, "A", "tech") DynamoDB(B, "B", "tech") Aurora(C, "C", "tech") (A) -- (B) (A) -- (C) @enduml ૊ΈࠐΈͷϥΠϒϥϦͷҰཡ͸ 
 IUUQTQMBOUVNMDPNKBTUEMJC
  10. ৭Λม͑ͯݟ΍͘͢͢ΔʢಛఆͷཁૉͷΈʣ @startuml skinparam usecase<<SPECIAL>> { backgroundColor #fcc } usecase A

    <<SPECIAL>> (A) -- (B) (A) -- (C) @enduml 41&$*"-ͷϥϕϧ͕෇͍ͨ VTFDBTFͷΈ͕ର৅
  11. 3FGFSFODFT w 4UBCMF%J ff VTJPO0OMJOF w IUUQTTUBCMFEJ ff VTJPOXFCDPN w

    "NBOJTMPPLJOHVQBUBIJHIXBMM5IFXBMMJTNBEFPGCSJDLT5IF XBMMJTNFUFSTIJHI