I'm assuming you're not advocating having postgersql serve up html and javascript, and listen on ssl connections directly from the clients.
So you'll need some middleware, and there's no good reason why you shouldn't be able to keep your model and validation logic in one place - I'm guessing one of the easiest approaches, if you're using an sql database, is to use nodejs for the middleware, sharing as much as possible of validation and model-code between the api server and the client?
I think having to fix three different code-bases on every model change/feature addition is going to be a problem (SQL, PHP/Scala/Ruby/Python, and javascript + bonus fourth language if you use templates...). I'm not saying it can't be done, I'm saying there has to be a better way?
Re:AngularJS: an Overview
by coolsunglasses on Monday July 08, 2013 @11:44PM
(#6010976)
I typically use Clojure serverside and JS or ClojureScript client-side with a PostgreSQL database backing persistence.
Just use Postgres if you don't have very specific, very unusual, and very well understood needs.