8 ms·
Why do we organize by shape, and not by function in our monoliths? We put all our controllers in a package, all our DB accessors in another package, all our "da
by atx42 4y ago
Why do we organize by shape, and not by function in our monoliths? We put all our controllers in a package, all our DB accessors in another package, all our "data objects" in another package. Even in OO languages like Java where we have package accessors that never get used because we layout our code such that package scope can never be used. We instead layout the code according to "shape".
When figuring out what to spin-off as a microservice, we do this by functionality. Why not just make it easier in the monolith and organize by functionality instead? Let's act like 4yr olds, not 3yr olds: https://pubmed.ncbi.nlm.nih.gov/12090481/ https://pubmed.ncbi.nlm.nih.gov/12090481/
- metaltyphoon 4y agoThe wording you are looking for is called "Vertical Slicing". After using it, I'll never go back to "shapes" anymore.
- atx42 4y agoThanks, I didn't know there was a name for it. But every single code example out there is an anti-pattern to this as far as I've seen.