📘 Object Diagram, Component Diagram, and Deployment Diagram (OOAD)
These are UML structural diagrams used to show different views of a system.
🔷 1. Object Diagram
🔹 Definition
An Object Diagram is a snapshot of a system at a specific point in time, showing:
- Objects (instances of classes)
- Their attributes (current values)
- Relationships between objects
👉 Simple idea:
It shows real objects in action at a particular moment.
🔹 Key Points ⭐
- Derived from class diagrams
- Represents runtime snapshot
- Focuses on actual instances, not classes
🔹 Notation
objectName : ClassName
-----------------------
attribute = value
🔹 Example (Library System)
book1 : Book
----------------
title = "OOAD"
author = "UML"
member1 : Member
----------------
name = "Ali"
🔹 Use Case
- Debugging system behavior
- Understanding object interactions
- Testing design logic
🔹 Advantage
- Easy to visualize real system state
- Helps in debugging
🔷 2. Component Diagram
🔹 Definition
A Component Diagram shows the organization and dependencies of software components in a system.
👉 Simple idea:
It shows how a system is built using modules (components).
🔹 Key Points ⭐
- Focuses on physical software structure
- Used in implementation phase
- Shows code-level organization
🔹 Components Examples
- Database module
- UI module
- Authentication module
🔹 Notation
+----------------------+
| Component Name |
|----------------------|
| Provided Interface |
| Required Interface |
+----------------------+
🔹 Example (Online System)
[User Interface] → [Business Logic] → [Database]
🔹 Interfaces
| Type |
Meaning |
| Provided |
Services offered |
| Required |
Services needed |
🔹 Advantage
- Improves modularity
- Easy maintenance
- Supports reuse
🔷 3. Deployment Diagram
🔹 Definition
A Deployment Diagram shows how software is physically deployed on hardware nodes.
👉 Simple idea:
It shows where software runs in real world machines/servers.
🔹 Key Points ⭐
- Focuses on hardware + software mapping
- Used in system deployment phase
- Shows runtime environment
🔹 Components
| Element |
Description |
| Node |
Hardware device (server, PC) |
| Artifact |
Software files (code, app) |
| Connection |
Network link |
🔹 Notation
[Server]
|
[Client PC]
🔹 Example (Web System)
Client Browser → Web Server → Database Server
🔹 Real Deployment Example
- Mobile App → Phone
- Backend → Cloud Server
- Database → Database Server
🔹 Advantage
- Shows system architecture
- Helps in network planning
- Useful for distributed systems
🔷 4. Comparison of All Three Diagrams ⭐
| Feature |
Object Diagram |
Component Diagram |
Deployment Diagram |
| Focus |
Objects |
Software modules |
Hardware + software |
| Level |
Runtime snapshot |
Design/implementation |
Physical deployment |
| Shows |
Instances |
Components |
Nodes (machines) |
| Purpose |
Debugging |
System structure |
System installation |
🔷 5. Key Differences in Simple Words
- Object Diagram → "What exists now"
- Component Diagram → "How system is built"
- Deployment Diagram → "Where system runs"
🔷 6. Likely Exam Questions
- Define object diagram.
- What is a component diagram?
- Explain deployment diagram.
- Difference between object and class diagram.
- Draw component diagram of a system.
- What are nodes in deployment diagram?
- Explain real-life use of object diagram.
- What is an artifact in deployment diagram?
- Compare all three diagrams.
- Advantages of component diagrams.
🔷 7. Quick Revision Summary 🧠
🔹 Object Diagram
- Snapshot of real objects
- Shows instances at a moment
🔹 Component Diagram
- Shows software modules
- Focus on system structure
🔹 Deployment Diagram
- Shows hardware + software mapping
- Focus on physical execution
👉 Easy Trick:
"OCD → Objects, Components, Deployment"