With powerful frameworks like jQuery, it seems to be possible to build an entire app logic on the client side. It\'s very much analogous to building a client app as a native
Well, the annoying part is going to be authentication.
Because code is ran completely on the client side, the client then knows all of the authentication details to access the database server.
This is rather .. err ... unsafe. Which is probably why not many people have developed a direct-access server..
If you really want to keep the PHP/Server-Side scripting to a minimum, make a fairly robust PHP proxy than properly escapes all data. Keep the configuration details in a separate protected ini file, or even the php.ini file, and you can pretty much ignore the server-side scripting after that.