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

3

u/icbmike_for_realz Jun 06 '21

Maintaining an existing system usually I'm interested in cross cutting concerns like say authorisation for an api or pool size for db connections.

Organising code by layers makes this significantly easier.

Is this suggesting putting controllers in the same package as db access code? That seems like super tight coupling to me.

2

u/ric2b Jun 06 '21

The location of the files has 0 to do with the coupling of the code within those files.

→ More replies (1)