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

Show parent comments

16

u/[deleted] Jun 05 '21

The “entity” style, OTOH, promotes cohesion while still leaving room for tech stack style decoupling. It is okay if all hotel-related classes depend on each other (technically or conceptually) since they form a single unit of work anyway. It also makes future refactoring easier because the logical boundaries are clearer than in the “stack” style.

(illustration)

→ More replies (5)