You can accomplish this, after a sort, using databases like CouchDB and Mongodb.<p>While its entirely possible to write a pure client/database web application, you are going to run into security issues. You are inherently opening up your database to the outside world, and javascript clients are inherently un-trustworthy from a security angle.<p>If I were designing such a platform, I would segment actions into "safe" and "non-safe" areas. Safe areas would be client/database actions that are ok for the javascript client to access externally. Non-safe areas, such as account creation and editing, financial interactions, etc, would need a middle-tier server-side application layer. The middle-tier would need to act as a proxy that handles validation of database requests, etc.
Yes. For one, you don't let the intertubes (clients) all talk to your database.<p>Second, there are tons of other stuff that we do on the server side besides talking to databases. E.g image processing, task queues, etc.<p>And lastly, Javascript is not the most elegant of languages. No much benefit of using it in the server side, besides the mythical "so we can share code", as if server and client side do the same stuff (with the exception of input validation).