Direct access to the server database via Ajax (without PHP or any other intermediate layer)

With powerful frameworks such as jQuery, it seems that you can build the whole application logic on the client side. This is very similar to creating a client application as a native program.

Now suppose that this client application needs to access a remote database. The usual solution seems to be related to Ajax / PHP / MySQL layers.

It seems to me that the PHP layer is no longer needed; all logic and user interface are taken into account by the browser application.

The question arises: should there not exist (I hope reliable and safe) a database server that simply takes an HTTP request and returns an XML result? This result can be easily analyzed, for example, client-side jQuery.

I cannot find the database or structure in these lines. Any ideas?

+5
source share
3 answers

, , HTTP? , . MonetDB/XQuery (http://monetdb.cwi.nl/XQuery/QuickTour/XRPC/) NoSQL, CouchDB (http://couchdb.apache.org/). rdbms-, Oracle (Oracle Application Express HTTP-, APEX http://www.oracle.com/technology/products/database/application_express/index.html) MS SQL ( , http://msdn.microsoft.com/en-us/library/ms190332.aspx XML, . http://msdn.microsoft.com/en-us/library/aa286527.aspx)

- , .

, , HTTP. , webserver/php, , , . , , - , .

, : - - . -. , .

, http- , db , , db. , db. , DHB- HTTP-, -, apache? - , . , HTTP-?

, , . XML . . , JSON? ? , , CSV? Webserver, PHP, ASP.NET, Perl Java, . . , , , Java .NET , - . . db, , . , , (, -/ ), , , , , ..

+11

, .

, .

.. err... . , .

PHP/Server-Side , PHP-, , . ini php.ini, .

+7

I assume this can be done, but PHP is more convenient for manipulating result sets. In addition, the traditional approach provides an additional level of security, so that machines in the wild do not have direct access to the database, and all the usual means of security and access control to the web server can be used.

+1
source

All Articles