Vertical slices, their ownership and external dependencies

  • Published on Oskar Dudycz
  • Curated on
Vertical slices, their ownership and external dependencies - Oskar Dudycz
Image: Oskar Dudycz

A few questions about Vertical Slices come up again and again, and they’re good ones.

  • If a slice cuts through all the layers, do we get a table per slice?
  • If I’ve split the application into seven areas, are those seven bounded contexts, or seven slices of one? And does the answer change what they’re allowed to know about each other?
  • How can a “verify order” slice check what a “register order” slice wrote, if the two aren’t supposed to know about each other?
  • Where does the fetching code live when one screen needs data owned by another module, and the dependency rules block every place we could put it?
  • Should a UI component know about the API call a neighbouring component makes?

For me, these are all versions of one question: what does a slice do when it needs something from the outside world?

Calling every area of an application a bounded context sets the bar for separation as high as it can go, because contexts are genuinely meant to be autonomous. Once you’ve done that, connecting any two of them looks like a violation, and the other questions have no legal answer.…