Boundaries — Test Your Understanding
Answer each question thoroughly. Focus on defining clear responsibilities — what is inside, what is outside, and why.
Section A: Identification
Question 1
A restaurant has:
- Customers who order food from a menu
- Waitstaff who take orders and deliver food
- A kitchen that prepares the food
- A billing system that produces the check
- A reservation system for booking tables
Identify the natural boundaries in this system. For each boundary, write what is inside it and what is explicitly outside it.
Question 2
Someone proposes the following module structure for a blogging platform:
- DatabaseModule — all database operations
- APIModule — all API endpoints
- UIModule — all user-facing pages
What is wrong with this boundary structure? Propose a better one and explain why it's better.
Question 3
You encounter a module called "Utils" that contains:
- A function that formats dates
- A function that calculates shipping costs
- A function that validates email addresses
- A function that generates PDF reports
- A function that checks if a user is logged in
For each function, identify which boundary it actually belongs to. Explain why "Utils" is not a real boundary.
Section B: Analysis
Question 4
Two modules exist in a system:
Module A: OrderProcessing
- Creates orders
- Calculates totals
- Applies discount codes
- Charges the customer's credit card
- Sends a confirmation email
Module B: CustomerManagement
- Stores customer profiles
- Manages addresses
- Tracks order history
Evaluate the boundaries. Is everything in the right place? Identify at least two items that might belong elsewhere, and explain your reasoning.
Question 5
A team is building a social media app. They have one module called "PostManager" that handles:
- Creating posts
- Editing posts
- Deleting posts
- Displaying the news feed
- Recommending trending posts
- Moderating reported posts
- Tracking post analytics (views, shares)
This is becoming a God Module. Propose how to split it into smaller, well-defined boundaries. For each new boundary, apply the elevator test (one-sentence description).
Question 6
You have two modules: Inventory and Shipping. Currently:
- Inventory knows how to check stock levels
- Shipping needs to know stock levels before it can ship
Someone proposes: "Let's just let Shipping read directly from the Inventory database to check stock."
Using the concepts of cohesion and coupling, explain why this is problematic. Propose a better approach.
Section C: Design
Question 7
Design the boundary structure for a school management system with these requirements:
- Students enroll in courses
- Teachers are assigned to courses
- Grades are recorded per student per course
- Parents can view their child's grades
- The school generates report cards each semester
- Attendance is tracked daily
Produce:
- A list of modules with inside/outside definitions
- A connection diagram showing what each module needs from the others
- The elevator-test sentence for each module
Question 8
You are designing a ride-sharing app (like Uber). The core actions are:
- Riders request a ride
- Drivers accept rides
- The system matches riders to nearby drivers
- Pricing is calculated based on distance, time, and demand
- Payments are processed after the ride
- Both riders and drivers can rate each other
Draw the boundary structure. Pay special attention to: where does "matching" live? Where does "pricing" live? Are they the same boundary or different? Justify your decision.
Question 9
A startup asks you to architect a recipe sharing platform. Users can:
- Create and share recipes
- Search recipes by ingredient, cuisine, or dietary restriction
- Save favorite recipes
- Create meal plans for the week
- Generate a shopping list from a meal plan
- Follow other users and see their new recipes
Define the module boundaries. At least one of your decisions should involve a tradeoff — two reasonable options where you pick one. Explain the tradeoff and why you chose what you chose.
Section D: Critical Thinking
Question 10
"Every module should be completely independent and never talk to any other module."
Is this statement true, false, or misleading? Explain when connections between modules are necessary and how to have them without destroying boundary integrity.
Question 11
Two engineers disagree:
Engineer A: "Shopping cart and checkout should be one module. They're part of the same user flow."
Engineer B: "Shopping cart and checkout should be separate modules. A cart is about managing what you want to buy. Checkout is about paying for it."
Both have reasonable arguments. Evaluate both positions. Under what circumstances is A right? Under what circumstances is B right? What would you recommend for a small team building an MVP? What would you recommend for a large team building a mature platform?
Question 12
You inherit a system where a single module called "NotificationService" handles:
- Deciding when to send notifications (business rules)
- Deciding who to send them to (recipient logic)
- Deciding what channel to use (email vs. push vs. SMS)
- Formatting the message content
- Actually sending via the appropriate channel
- Logging what was sent
- Managing user notification preferences
This module works fine today. Argue for or against splitting it up. If you split it, where do you draw the new boundaries? If you don't, explain what conditions would eventually force a split.
Grading Rubric
| Criteria | What It Means |
|---|---|
| Clear inside/outside | Each boundary has an explicit list of what it owns and what it doesn't |
| Reasonable groupings | Related things are together, unrelated things are apart |
| Minimal coupling | Boundaries connect through narrow, well-defined channels — not through shared databases or deep knowledge of each other's internals |
| Defensible names | Every boundary can be explained in one sentence that a non-engineer would understand |
| Tradeoff awareness | Where a decision could go either way, you acknowledge the alternatives and explain your choice |