News for hackers. Stuff that matters.
Re:Show HN: Rust Web Framework by DeathArrow on Wednesday October 23, 2024 @05:59AM (#41923501)
I'd argue that you shouldn't use a fat model, either. To me the best way is using as least code as possible in controller, no code at all in model and having service layers that take care of business logic, and layer for talking to the database.
Re:Show HN: Rust Web Framework by cies on Thursday October 24, 2024 @04:10AM (#41933246)
Talking to the db should contain a lot of business logic if you want performant queries. I'd say the "service layer" and the "layer for talking to the database" (repositories) are all part of the model and all contain business logic.