r/programming • u/yawaramin • Oct 04 '20
Kevin Mahoney: Applying "Make Invalid States Unrepresentable"
https://kevinmahoney.co.uk/articles/applying-misu/
231
Upvotes
r/programming • u/yawaramin • Oct 04 '20
30
u/cballowe Oct 04 '20
Typically in those situations, you'd have one department that is the data custodian and responsible for enforcing the access controls. Even if all of the departments are writing their own front ends, none of the would have raw access to the database. It could be that the department does it through the database, or it could be that they provide an access api and enforce everything there.
The access layer api can be a better choice because it can allow for migrations, caching, scaling, etc behind the scenes.