News for hackers. Stuff that matters.
Re:Show HN: Rust Web Framework by sergiosgc on Tuesday October 22, 2024 @05:38PM (#41918998)
I tend to draw the line at intrinsic vs extrinsic behavior. The model layer must be able to maintain all intrinsic properties. Whenever it would talk outside the application, it's beyond the domain of the model.

Taken to the extreme, you could model all intrinsic constraints and triggers at the relational database level, and have a perfectly functional anemic domain model.

Re:Show HN: Rust Web Framework by cies on Wednesday October 23, 2024 @06:18AM (#41923575)
In our model we have "repositories" (they dont talk outside the application, they basically contain queries related to a specific db table), and "services" (they call models, do queries that we not related to a specific db table and may talk to outside the application).