Ajaxdo contains 3 folders:
2) ./ajaxdo_php/ -Contains the server side implementation of Ajaxdo in PHP
Note: next releases of Ajaxdo will contain ajaxdo_java and ajaxdo_net for other server side language support.
3) ./examples/ – contains simple web applications that use Ajaxdo
listObjects() – returns an array of object names that are the primary key for objects saved in this application context (this DB table)
loadURL – The URL of the server side implementation that is responsible for loading objects (for example http://someDomain/ajaxdo_php/load.php)
saveURL - The URL of the server side implementation that is responsible for saving objects (for example http://someDomain/ajaxdo_php/save.php)
deleteURL – The URL of the server side implementation that is responsible for deleting objects (for example http://someDomain/ajaxdo_php/delete.php)
listURL - The URL of the server side implementation that is responsible for listing objects (for example http://someDomain/ajaxdo_php/list.php)
These URLs can be modified at runtime, see the examples in the release.
Server side implementation
Ajaxdo PHP implementation
The ajaxdo_php folder contains a set of PHP script that implements the Ajaxdo server side API.
config.php holds the database configurations such as schema, user and password. Please configure this file according to your database definitions.
Ajaxdo Java implementation
Since Ajaxdo 1.1
The ajaxdo Java server side implementation is composed of four JSP files (
delete.jsp, load.jsp, list.jsp, save.jsp) and one data access object called
AjaxdoDAO implementation relays on JNDI Datasource (review the serverside corrections to this document). The Datasource JNDI-resource name should be â€œjava:comp/env/jdbc/AjaxdoDB1â€.
All examples have been modified to work both with PHP and Java and enable runtime switching between them. Please note that the samples load by default with the PHP version. To start the example with a Java server side implementation, see the comments in the example body and uncomment the necessary parts.
This release was tested under tomcat 5 and MySQL 5.
Ajaxdo database configuration
Each web application can use several database tables (via multiple instances of Ajaxdo and application context). It is recommended that two logically-separate web application use different application context.
For each application context there needs to be a correlating database table with the following columns:
OBJECT_NAME – varchar(45) – primary key
OBJECT_DATA – text
OBJECT_TYPE – int(10)
Here is an example of the SQL statement that creates the table for the excel example application:
CREATE TABLE `ajaxdo`.`ajaxdo_excel` (
`OBJECT_NAME` varchar(45) NOT NULL,
`OBJECT_DATA` text NOT NULL,
`OBJECT_TYPE` int(10) unsigned NOT NULL default '1',
PRIMARY KEY (`OBJECT_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
An example use of Ajaxdo can be found in the current release under the example folder.