Module 2: Architecture Patterns & Modularity: Guided Labs
Lab 1: Modular-Monolith Boundary Workshop
Starting from a coupled sample application, group code by capability, define public module APIs, hide persistence, and add automated dependency rules. Demonstrate a forbidden dependency failing CI.
Lab 2: Pattern Comparison Under Shared Forces
Evaluate layered, modular monolith, service-based, event-driven, and microservice candidates against the same deployment, consistency, latency, scale, team, and operability scenarios. Eliminate patterns with evidence.
Lab 3: Distribution-Tax Spike
Extract one thin capability behind a network boundary. Add timeout, retry, idempotency, tracing, contract testing, deployment, and failure recovery. Compare total change surface with the in-process module.
Lab 4: Reverse the Extraction
Identify whether the service boundary earned its tax. If not, merge it back while preserving the logical module boundary. Record which evidence changed the decision.
Evidence: dependency map, enforcement test, comparison matrix, tax ledger, and decision.