PHP Classes

MySQL Ajax Database Access Layer - MADAL: Generate code to manage MySQL tables using AJAX

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 45%Total: 1,817 All time: 2,162 This week: 206Up
Version License PHP version Categories
madal 1.0MIT/X Consortium ...5.2PHP 5, Databases, Code Generation, AJAX


MADAL allows one to quickly generate ajax enabled web-pages.

MADAL is an Ajax based database access layer for MySQL written in PHP and Javascript. It generates PHP and Javascript/jQuery source code that is well documented, so you can use your IDE's auto-completion against database tables and fields. The documentation was designed with PHP Eclipse in mind, but should work for any IDE that recognizes PHP doc.

Downloading: PHP Classes has only example and main classes, for the full working code, please download from the Google code project link:

Here's how simple using MADAL is:


This will give you an input field (text, checkbox, textarea, or datepicker) that updates the database FieldName of the row represented by $table_name onblur (see attached images). Pretty simple, right?

MADAL also generates Javascript objects that allow you to update the database based on your own custom fields.

For example:

This will make an ajax call to the MADAL web service. Much simpler than writing a custom update page for every field of the database, and custom classes for every table.

Core components:

* Javascript (with jQuery)


* PHP Model - generates a set of PHP classes that mirror your database format
* Javascript Model - generates a set of javascript/jQuery classes that mirror your database and allows for easy client side display and modification
* MADAL Web Service - generates an easy to use web-service for accessing your database (includes instructions for implementing security)
* Easy ajax - simply print the input field and you've got an ajax enabled field
* Field validation - input fields are validated for their type
* jQuery ui themes - MADAL includes the whole set of default jQuery ui themes for easy styling of your pages. You can also add more using the jQuery ui theme roller.
* Optimistic concurrency - if more than one user is accessing a piece of data, and one of the users updates a field, then the other user updates the same field (but has out of date information), the second user will receive a notification that the field is in use, and the page will auto-refresh thus retrieving the most up-to-date data.

Picture of Brent Rossen
Name: Brent Rossen <contact>
Classes: 4 packages by
Country: United States United States
Age: 43
All time rank: 1109160 in United States United States
Week rank: 301 Up34 in United States United States Up

  • example_interface_simple
  • example_interface_detailed
  • example_interface_db_schema
  • date_example.png
  • wysiwyg_example.jpg
  Files folder image Files  
File Role Description
Files folder imageModelIncludes (1 file)
Plain text file example_usage_simple Example A simple example using the MADAL db
Plain text file example_usage_relational Example Example showing the display of several related tables (see images for screenshot)
Plain text file ClassGenerator.php Class Main class that generates PHP model Classes
Plain text file ClassGeneratorJavascript.php Class Main class that generates javascript class objects. Depends on ClassGenerator.
Plain text file DBStructure.php Class Manages the generation of both PHP and javascript classes, as well as copying dependencies
Plain text file GenerateMVC.php Appl. File to call to start the code generation process
Plain text file web_service.php Aux. The web-service used by the javascript classes

  Files folder image Files  /  ModelIncludes  
File Role Description
  Plain text file DBElement.php Class Parent class for all db model classes

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,162
This week:206Up
User Ratings User Comments (1)
 All time