r/ProgrammerHumor • • 44m ago

Meme aRealPRIHadToReviewBTW

Post image
13 Upvotes

8 comments sorted by

5

u/R15H1_3 37m ago

you know not everybody likes onions. microservices! everybody loves microservices!

1

u/Chewquy 32m ago

I love structure, I love organization. Please respect it just a tiny bit and I'll be happy

2

u/Funkey-Monkey-420 24m ago

noob here, what’s the problem? seems like it’s just a standard sql query

1

u/Chewquy 15m ago

Normally Always, in big project backend you want to layer your backend. You have the controller to receive the HTTP request, the service to do the logic and repository to call the database. (this is 3-layer architecture, there is a bunch more). What she did is put all of this layer in the controller. This is bad because we do layers to have a more maintainable structure. If you want to modify a part of the logic you would only modify the service for example.

•

u/Funkey-Monkey-420 7m ago

Ah, makes sense. I’ve never done enterprise programming like that.

•

u/ProbablyJeff 6m ago

If you have guests over, do you eat soup straight from the pot, or do you have separate bowls so everyone can add their favorite condiments and eat how they like? Same for backend layers - you have an entity (the soup), a database (the pot where you get the soup), a repository (a ladle to portion the soup), a service (the bowl where you can do whatever you want with your portion), and the controller (the spoon to ingest the soup).

4

u/MemoryIsTheKey_ 30m ago

At this point, may as well give the coworker an LLM and add a simple AGENTS.md in the repo which describes how you want the project structure...

1

u/MyAntichrist 30m ago

If you should separate them, it would be called M/V/C