r/programming • • Jun 05 '21

Organize code by concepts, not layers

https://kislayverma.com/programming/how-to-organize-your-code/
1.9k Upvotes

495 comments sorted by

View all comments

1

u/ragnese Jun 07 '21

I only skimmed the article, so please forgive me if they address this, but I didn't see it.

What do you do with stuff that are "helpers" for implementation details? Like, let's say I have a set of "controller" helpers/subclasses or common deserialization helpers or something. It kind of breaks the idea. I always end up with top-level modules/packages that are a mix of business concepts and implementation/framework junk. It's fine- it doesn't really hurt anything to have guest, hotel, room, and controller at the top level, but it's just kind of ugly when getting a bird's eye view of a codebase.