Re:Embracing SQL in Postgres
by spacemanmatt on Thursday February 26, 2015 @08:32AM
(#9112357)
DRY is the reason I write a remote facade. Security (e.g. sanitizing inputs) is less-repeated at the database boundary than at myriad application/ORM implementations.
[ Parent
| on HN ]
Re:Embracing SQL in Postgres
by crdoconnor on Thursday February 26, 2015 @09:58AM
(#9112787)
>DRY is the reason I write a remote facade.
Remote facade sounds like a lot of boilerplate to me.
Re:Embracing SQL in Postgres
by spacemanmatt on Thursday February 26, 2015 @06:07PM
(#9116207)
It truly varies. If all you're doing is sanitizing a simple INSERT, it's almost pure boilerplate, but that is not a very interesting or common case.
I'll offer some of the reasoning that got me to building remote facades. The database needed to sanitize its own inputs; we could not trust application developers with that. There would be multiple client-languages (Ruby, Python, Java, for starters) and I wanted to keep domain adapters for those languages simple as possible. The database would be changing regularly, and many changes could be simply absorbed in the remote facade, so applications depending on the remote facade via their client-language libraries would be somewhat insulated.
Now, it wasn't a perfect regime, and nothing is. But it paid the bills for years and my schemas are still in play at that place.