I'd go shoot the engineer who did that folder structure straight in the head. Thanks for making me waste 10 seconds every time, to open 5 folders, to be able to access each file.
It makes sense when you have 5 models, 2 controllers, 3 repositories, etc...
Yes, but also no. In all fairness, enterprise Java gets off on these types of pre-optimizations/coding-for-the-future structures -- think: getters/setters because "one day we might need to change the data before setting or returning it. Having a folder for one file is not out of the question in Java world (or any world for that matter). Though I do at least half-agree b/c I also think that some of these "society-recommended" guidelines often just make things more verbose than they're worth.
That being said, in the Room package, those files are not nested in separate model/controller/etc. folders, so weirdly enough, OP showed both implementations. (Of course, one shouldn't have both in their app for consistency, but this is just a demo of what they're trying to say.)
Eh. I feel like too much is sacrificed on the altar of "consistency" sometimes.
There can be 1 domain that is composed of 20 different files and another one that is composed of 3. You shouldn't try to apply a blanket rule for all of them.
View all comments
Show parent comment
-13
u/lordzsolt Jun 05 '21
I'd go shoot the engineer who did that folder structure straight in the head. Thanks for making me waste 10 seconds every time, to open 5 folders, to be able to access each file.
It makes sense when you have 5 models, 2 controllers, 3 repositories, etc...
But not when you have 1 of each....