DOAP - Remote Abstract Data Access Protocol by Dave

DOAP (Dave's Own Access Protocol) is a simple method allowing exchange of arbitary data between a JavaScript client and a PHP server.

It allows you in effect to call PHP functions on the server and receive the result back; like a very much simplified version of SOAP but JavaScript native.

How Simple? This Simple...

PHP Code on the Web Server:
<?php
function hello_world() { return "Hello World!"; }
require("xmlcreate.inc.php");
require("doap.inc.php");
$doap = new DOAP_Server();
$doap->Register("hello_world",0,0);
$doap->Process();
?>

HTML/JavaScript Code for the Client:
<HTML>
<SCRIPT TYPE="text/javascript" SRC="doap.js"></SCRIPT>
<SCRIPT TYPE="text/javascript">
var doap = new DOAP();
doap.url = "example0.php";
alert(doap.call('hello_world'));
</SCRIPT>
</HTML>

The above code will make the browser alert with "Hello World!" (the result of the hello_world() function on the server. To see it for yourself click here.

What Can It Be Used For?

Any Web/JavaScript app that wants to exchange data with a PHP server. It saves you having to write your own framework and communication errors etc and is a lot simpler and lightweight than other existing frameworks.

By returning native JavaScript dynamic variables or Array objects (yes you can return array data) your code can use returned data straight away without having to process it in any way.

DOAP is Entirely Free

The DOAP software is licenced under the GNU GPL v3. This allows you to use it, abuse it, customise it or extend it as you wish for no money at all.

You can even re-release it but you must keep it free. For more information see the GNU GPL v3 which applies to the software or the GNU FDL 1.3 which applies to the documentation.

Like the price? Why not check out some of our other free software such as FreeNATS Network Monitor, REX PHP Remote Execution Framework, iArray Associative Arrays for JavaScript, MyRug MySQL Schema Updater, MyRep MySQL Automated Repair, PHP DNS Client/Library or PPPing PHP ICMP Ping Client/Library.