The follow-up now exists four times in kladde-stile: in layers, in clean architecture, hexagonal with a second entrance, and as vertical
slices. Every version got the same change, and every one is measured with the same tool and the same git commands. This lesson puts the four
columns side by side, shows for each style an architecture test that holds it in the build, and leads to the decision that module 4.10 was
about from the start: which style the Kladde is built in from here on.
The Kladde gets only two things from the whole module: an ADR with the measurement comparison and extended architecture tests. Both come out of the exercises. You know the template for the ADR from lesson 4.1.3, the architecture test from lesson 4.3.6.
The four measurement sheets side by side
All numbers come from tools/measure.cs and git diff --stat at the tags <x>-before and <x>-after, as lessons 4.10.2 to 4.10.5 measured
them:
| Measuring point | A Layers | B Clean | C Hexagonal | D Slices |
|---|---|---|---|---|
| Projects, project references (production) | 3, 2 | 4, 4 | 4, 5 | 1, 0 |
| Lines production, before → after | 179 → 194 | 243 → 255 | 205 → 217 | 164 → 175 |
| Files, types production | 11, 16 | 15, 22 | 10, 15 | 9, 15 |
| Lines tests, before → after | 184 → 221 | 205 → 246 | 201 → 242 | 152 → 184 |
| Types only for mapping | 5 | 6 | 4 | 5 |
| "Weekly": files production (+/−) | 4 (27/9) | 5 (33/17) | 3 (31/15) | 4 (26/11) |
| "Weekly": files tests (+/−) | 2 (57/11) | 3 (65/13) | 3 (65/13) | 2 (50/10) |
| Where the rule lives | FollowUpService.CompleteAsync |
FollowUp.Complete |
FollowUp.Complete |
FollowUp.Complete |
| Cheapest test of the rule | with database | without host and database | without host and database | without host and database |
| What the core knows | FollowUps.Data, EF Core with SQLite |
nothing | nothing | the folder nothing, its project EF Core and ASP.NET Core |
On top come two measurements that occurred in only one version. The second driving adapter in version C added 10 files with 236 lines and changed no file of the middle. And the tests of the rule took different amounts of time in individual runs: version A needed just under 4 seconds for its tests with SQLite, B and C a good 1.4 seconds for the tests of the model, D a good 2 seconds, because the test project builds the web project too. Times vary from run to run; the order stayed the same.