

Ask HN: SQL vs ORM - Why Not SQL Web APIs? - anthony_barker

Recently I was looking at yet another API that an IT vendor has put together (rest + xml). I also read this http:&#x2F;&#x2F;wozniak.ca&#x2F;what-orms-have-taught-me-just-learn-sql article.<p>This go me wondering why so few sites use SQL type APIs (with SQL cleaning)? (only found http:&#x2F;&#x2F;docs.cartodb.com&#x2F;cartodb-platform&#x2F;sql-api.html and paypal business).
======
anthony_barker
one more from google

[https://developers.google.com/chart/interactive/docs/queryla...](https://developers.google.com/chart/interactive/docs/querylanguage)

------
kyllo
Well, if you think about the path that this leads down, you're going to be
building SQL statements with string concatenation in client-side Javascript,
with no server-side business logic in between. That just seems extraordinarily
dangerous, not to mention mixing data access code into the UI code is poor
design, you need some separation of concerns in order to have a maintanable
code base.

~~~
anthony_barker
I was thinking of more server to server apis (python/ruby/java/c#)

For the SPA/MVC Javascript crowd (angularjs etc) they basically are already
promoting business logic on the front end.

