The course has eighteen modules. Modules 1 to 14 change Fieldwork step by step, modules 15 and 16 look back at what we built, and module 17 is a bonus. Here is the whole path in one place, so you always know where we are.
The Modules
- Module 0: Course Introduction. We set up what the course needs and meet Fieldwork, the application we work on.
- Module 1: Measuring Coupling in the Application. We make Fieldwork’s known problems happen with real requests, and we write a test that counts the references between its parts.
- Module 2: Drawing Module Boundaries. We decide which part of Fieldwork moves out first, and we lay out the solution the rest of the course fills in.
- Module 3: Extracting the Customers Module. We move the customer features into a module of their own, while the application keeps answering every request.
- Module 4: Contracts Between Modules. We give the Customers module a public contract and send every outside caller through it.
- Module 5: Data Ownership per Module. We give every module its own data and its own migrations, and we rebuild the dashboard query so it no longer joins tables from different modules.
- Module 6: Extracting the Scheduling Module. We move scheduling into a module of its own, and every booking goes through the booking rule inside it.
- Module 7: Integration Events Between Modules. We let one module announce that something happened, without knowing who is listening.
- Module 8: Extracting the Jobs and Parts Modules. We move jobs and parts out, publish the event the rest of the system waits for, and handle it safely when it arrives twice.
- Module 9: The Outbox Pattern. We make sure an event reaches every module that listens for it, even after a crash.
- Module 10: Extracting Billing Across Modules. We run billing across four modules with no shared transaction, and put things back when one step fails.
- Module 11: Reporting Across Modules. We build the dashboard from copies of each module’s data instead of a join, and we show how old each number on it can be.
- Module 12: Testing and Enforcing Module Boundaries. We make a forbidden reference between two modules fail the build, and we test a flow that crosses modules.
- Module 13: Moving and Merging Module Boundaries. We measure what the module boundaries cost, move a rule between two modules, and merge two modules back into one.
- Module 14: Extracting a Module Into a Service. We move the Billing module into a separate service and measure what that costs.
- Module 15: Modular Monolith Anti-Patterns. We read 13 common mistakes in code, say what each one costs, and compare each one with the file in our solution that avoids it.
- Module 16: Cheat Sheets, Interview Questions and Next Steps. We collect the course’s decision guides, answer interview questions, take the final quiz, and plan the first step for your own team.
- Module 17: Messaging With Wolverine and RabbitMQ (Bonus). We replace our hand-built messaging with Wolverine, put RabbitMQ between two processes, and run the message processing in a worker of its own.
Commands and Outputs
A command snippet holds what you type, and the output snippet after it holds what the command printed on our machine. Here is a request you have not met yet, which asks Fieldwork for its customers. Pick the tab for your system:
Invoke-RestMethod http://localhost:5000/api/customers |
Format-Table name, contactName, siteCount -AutoSize
curl -s http://localhost:5000/api/customers
And here is the table PowerShell printed:
name contactName siteCount ---- ----------- --------- Beechwood Care Home Lena Grgic 1 Clifton Veterinary Petra Lukic 1 Kingsway Print Mia Vukic 1 Lena Fabrics Lena Maric 2 Northgate Pharmacy Petra Ilic 1 Old Mill Brewery Marko Peric 1 Riverside Hotel Luka Simic 2 Sara Dental Sara Boric 1 Station Road Garage Tom Radic 1 Tom's Bakery Tom Novak 1 Westfield Grocers Sara Jelic 1
Every row comes from the seed data, so your table should match ours row for row, down to the two sites each of Lena Fabrics and Riverside Hotel. On our machine, curl printed the same 11 customers as one line of JSON, with more fields for each one, such as the contact’s email address. The request only reads data, so you can send it whenever Fieldwork is running.
Every output in this course comes from a real run on one of our Windows machines. The main path ran on Windows 10 Pro 19045, and lesson 5.5 and module 17 on Windows 11 Pro 26200 with Docker. Where an output prints a path, we show it inside the course folder from lesson 0.3, for example C:\course\module-01.
Your paths, timings and the order of some lines can differ on your machine. We name what should match after each snippet, such as the number of tests that passed.
Tabs for Windows, macOS and Linux
Most commands we use are the same in every shell, such as dotnet build. When a command differs, we give it two tabs in one snippet, and you pick the one for your system:
- Windows (PowerShell) is for the PowerShell that comes with Windows. We use it for every Windows command in the course.
- macOS and Linux (bash) is for the terminal on a Mac or a Linux machine. If you work in Git Bash on Windows, this tab works there too.
Click a tab to switch, and the Copy button copies the tab you see. You met them in lessons 0.3 and 0.4, and in the customers request above. Here is the one that starts module 2, and you run it then, not now:
Copy-Item -Recurse source\module-01-complete module-02
cp -r source/module-01-complete module-02
Both tabs make the same module-02 copy of our module 1 checkpoint, each in the words its shell understands.
Code From the Source Files
The code in our snippets is copied from the checkpoint files, a whole class or method at a time. When we talk about a few lines, we highlight them. Lines too long for the page are broken by hand, so a snippet and its file can differ in line breaks only.
Here is Fieldwork.Web/Models/Appointment.cs, the class behind every booking in our seed week:
namespace Fieldwork.Web.Models;
public class Appointment
{
public Guid Id { get; set; }
public Guid TechnicianId { get; set; }
public Guid JobId { get; set; }
public Guid SiteId { get; set; }
public DateTimeOffset StartsAt { get; set; }
public DateTimeOffset EndsAt { get; set; }
public string Status { get; set; } = "Scheduled";
}
The three highlighted lines say which technician the visit is for, and when it starts and ends.
Code Marked as Wrong
Most code snippets in the course hold code that ends up in the solution, and you can type it or copy it.
A few snippets show code with a problem in it, so we can see what the problem looks like. We meet the first of them in module 1. Each of them has a label above it that says Diagnosis only. Do not add this to your solution. A lesson built on that kind of code also opens with a note that says Read this lesson. Don’t type it. That note names the lesson where we start building again.
A Failing Build Inside a Lesson
Inside a lesson, the build can fail for a moment, when one change we make needs a second one to finish it. We say so before the snippet that breaks the build, and we name the snippet that fixes it.
The Exercise Sets
The first exercise sets start with a worked example and a small task of the same shape. Later sets hand you more of the work, and the last ones give you only the goal.
If you skip a set, you lose nothing, because no module builds on your exercise code.
Quizzes
Modules 1 to 15 end with a short quiz of five questions, and module 16 ends with a final quiz of 13. Modules 0 and 17 have no quiz. The quizzes are not exams.
You can take them as many times as you like, and each wrong answer explains why it is wrong. To read the explanations after an attempt, click Details on its result row, then the lightbulb beside each question. Use them to check that the ideas stuck before you move on.
The Glossary and the Cheat Sheet
Two PDFs come with the course, on the Resources tab of the course page, which shows once you are enrolled and signed in. The glossary holds every term the course introduces, with the sentence its lesson defines it in. The cheat sheet is one printable page with the nine decision cards of lesson 16.1.
You can now read every snippet in this course: a command and its output, the two tabs, and a source file with its highlighted lines. In the next lesson, we look at how the course keeps up with new .NET releases.