How ivan11-b/java-kanban works
Main Components
a. Task Management Layer
• Three task entities: Task, Epic, and Subtask
• Their hierarchical relationship (Epic contains Subtasks)
b. Manager Layer
• This as an intermediate layer
• Two main interfaces: TaskManager and HistoryManager
• Their implementations: InMemoryTaskManager and InMemoryHistoryManager
• Managers factory class
c. Data Storage Layer
• In-memory storage implementation
• Potential for future storage implementations
Component Relationships
• Tasks → TaskManager (managed by)
• TaskManager → HistoryManager (uses)
• Managers factory → Both manager implementations (creates)
• Epic → Subtask (contains)
Architectural Patterns to Highlight
Patterns clearly:
• Factory Pattern (via Managers class)
• Observer Pattern (for history tracking)
• Composite Pattern (Epic-Subtask relationship)
┌─────────────────────────────────────┐
• Client Layer │
• ┘
• ↓
┌─────────────────────────────────────┐
• Task Manager Layer │
• (Interfaces and Implementations) │
• ┘
• ↓
┌─────────────────────────────────────┐
• Task Entities Layer │
• (Task, Epic, and Subtask) │
• ┘
• ↓
┌─────────────────────────────────────┐
• Storage Layer │
• (In-Memory Implementation) │
• ┘