Architectural Diagrams
These diagrams shift focus from code structure to the physical and logical organization of the system.
1. Component Diagrams
A Component is a modular part of a system that encapsulates its contents and whose manifestation is replaceable.
Symbols
- Component: A box with two small rectangles on the left or a stereotype
<<component>>. - Provided Interface: “Lollipop” symbol (circle on a line). The services the component offers.
- Required Interface: “Socket” symbol (half-circle). The services the component needs.
PlantUML Code:
package "Order System" {
[Order Logic] --() IOrder
[Payment Service] --() IPayment
}
[Web UI] ..> IOrder : use
[Order Logic] ..> IPayment : use
System Diagram
2. Deployment Diagrams
These diagrams show the physical hardware and software mapping.
Symbols
- Node: A 3D cube representing a physical or virtual machine (e.g., “Web Server”, “Database”).
- Artifact: A physical file (JAR, DLL, script) deployed on a node.
- Communication Path: A line representing the protocol (e.g., SSH, HTTP).
Example
PlantUML Code:
node "Application Server" {
artifact "OrderService.jar"
}
node "Database Server" {
database "PostgreSQL"
}
"Application Server" -- "Database Server" : JDBC / TCP:5432
System Diagram
Decisions: Component or Node?
- Component: Logical unit of code/functionality.
- Node: Physical or virtual environment where components “live”.