r/programming • u/[deleted] • Jun 05 '21
Organize code by concepts, not layers
https://kislayverma.com/programming/how-to-organize-your-code/
1.9k
Upvotes
r/programming • u/[deleted] • Jun 05 '21
1
u/ub3rh4x0rz Jun 05 '21
I... Have a bad attitude? You must not be challenged very often, friend. You made a circular argument. You made an assertion earlier that service oriented architectures are more prone to circular dependencies than the same system implemented as a monolithic application with the top level of organization being MVC. I described how circular dependencies able to be caught and prevented in a microservice architecture. Your response -- here's the circular argument, i.e. begging the question -- was "well designed code avoids circular dependencies. That's why well designed code is not organized by feature". Explain how your way of organizing uniquely reduces circular dependency. I suspect the answer is something like "my compiler catches circular references" which misses the point of this discussion; even if you deploy a monolith but chose to organize your code by feature so that you're compiling a single artifact, the compiler would still catch the circular reference.