KM SOFT

rails-mvc-with-service-with-params-validation.puml

PlantUML source of a sequence diagram from the Apartment renting platform project.

@startuml
autoactivate on

actor User
participant Controller
participant ServiceA
participant ServiceB
participant Model
participant View

User -> Controller: request
autoactivate off
Controller -> Controller: Validate params
note left: Validate params here...

autoactivate on
Controller -> ServiceA: call
autoactivate off
ServiceA -> ServiceA: some logic
return

autoactivate on
Controller -> ServiceB: call
autoactivate off
ServiceB -> ServiceB: some logic

autoactivate on
ServiceB -> Model: interact
note right: ...not here\n(too late)
return ...
return ...

Controller -> View: render
return HTML

return HTML
@enduml

Download rails-mvc-with-service-with-params-validation.puml

rails-mvc-with-service-with-params-validation.puml rendered as SVG
Rendered diagram

PlantUML draws diagrams from plain text. Paste the source into the online server, or render it locally with plantuml -tsvg rails-mvc-with-service-with-params-validation.puml.