Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
From Class Diagram to Code and Back: Domain Model, Design Model and puml-gen
A domain model shows business concepts without types or operations, while a design class diagram shows the C#-level design decisions for the same case; the first is drawn by hand, slices of the second become code, and diagrams generated from code with tools like puml-gen are for observation and drift checks only. The post takes the HR Portal leave module from diagram to EF Core configuration and DDL, then back to PlantUML with puml-gen.
Sequence Diagrams 2: alt, opt, loop, par, break and ref for Error Paths and Async Flows
Combined fragments add conditions (alt, opt), early exit (break), repetition (loop), parallelism (par) and indivisibility (critical) to a sequence diagram, while ref calls another diagram; an asynchronous message has an open arrowhead and stays asynchronous even when awaited if the sender does not wait for the result. The post draws the HR Portal approval flow, the insufficient balance error and the e-mail and calendar entry sent through a queue from the real code.
Activity Diagrams: Actions, Decisions, Fork/Join, Swimlanes and Modeling an Approval Workflow
An activity diagram draws a workflow as steps, guarded decisions, parallelism with fork/join and swimlanes showing who does what; its semantics is token flow, so paths leaving a decision that do not meet in a merge get stuck in an implicit join. The post draws the HR Portal leave approval process with swimlanes, demonstrates the token rules with a small C# simulator and splits the flow into handlers.
The C4 Model: Context, Container, Component, Code and Notation Rules
The C4 model describes a software system as zooming maps at the Context, Container, Component and Code levels, each for a different reader; the first two levels are enough for most teams, and a C4 container is not a Docker container but a running application or data store. In this post we draw the HR Portal's Context, Container and Component diagrams following the notation checklist, write them as C4-PlantUML and show how to use C4 together with UML.
Diagrams as Code with PlantUML: Syntax, C4-PlantUML, Includes and Rendering in CI
PlantUML describes a diagram in a text file and renders it locally or in CI, so the diagram changes in the same PR as the code, gets diffed and is validated with --check-syntax. This post walks through the PlantUML sources of the series' use case, class, sequence, state and C4 diagrams, sharing a style with !include, rendering in GitHub Actions, and the privacy risks of the public server and the source embedded in SVGs, with real output.