Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok I get you now, yes you are correct, if you have a public API and you have business constraints that need to be enforced, you have to do this server side.

But you can still implement this easily in queries, so for example granting the client only read permissions, plus execution permissions on certain database functions, and inside these functions you can implement the constraints.

What I'm trying to say, is that you don't necessarily need any backend "services" java etc, to implement these type of constraints, they can be modelled as any other business logic in the database.



agreed. i've worked extensively with graphile, and from working with people who were really strong in postgres i learned all the things we needed could be modeled in postgres. many of the less obvious solutions would involve functions, triggers, or stored procedures. but i liked that there was less ambiguity about where that kind of logic was implemented.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: