News for hackers. Stuff that matters.
Re:Give me back my monolith (2019) by atx42 on Tuesday May 10, 2022 @02:21PM (#31330530)
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/

Re:Give me back my monolith (2019) by metaltyphoon on Tuesday May 10, 2022 @02:38PM (#31330825)
The wording you are looking for is called "Vertical Slicing". After using it, I'll never go back to "shapes" anymore.
Re:Give me back my monolith (2019) by atx42 on Tuesday May 10, 2022 @03:33PM (#31331552)
Thanks, 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.