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

3 points by anthony_barker ↗ HN
Recently I was looking at yet another API that an IT vendor has put together (rest + xml). I also read this http://wozniak.ca/what-orms-have-taught-me-just-learn-sql article.

This go me wondering why so few sites use SQL type APIs (with SQL cleaning)? (only found http://docs.cartodb.com/cartodb-platform/sql-api.html and paypal business).

3 comments

[ 3.1 ms ] story [ 18.8 ms ] thread
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.
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.