Re:DBCore
by revskill on Monday November 08, 2021 @11:28PM
(#29157742)
Real world CRUD is a bit different though, you want to send the log to somewhere else, use Sentry to try catch error in your CRUD endpoint. Or publishing a message to Kafka after u created an object. How to integrate "real world components" into this ?
[ Parent
| on HN ]
The primary use case I had in mind for this was internal business apps.
But a few ways you could hook without any code changes in dbcore: use LISTEN/NOTIFY or equivalent to hook on changes, poll for changes in the DB, "eject" the generated code and edit API handlers directly to call where you want, or just edit the default templates directly with whatever API handlers you want to call.
It's true there's not a great way to add hooks at a configuration level at the moment. But there are still many ways you could work around that.
Lot of these internal business apps have a attached workflow to CRUD (reviews, approval etc)
Any thoughts around workflows?
Not really in line with this particular CRUD subject, but combine-able esp. if things grow in size and scale: https://temporal.io provides a really nice way to code your workflows in Golang, applicable for small-scale, while hiding most complexity that come with scaling.