Thursday, October 27th, 2005

PAJAJ: PHP Asynchronous Javascript and JSON

Category: PHP, Toolkit

<p>A new PHP based Ajax framework put its hat in the ring: PAJAJ.

PAJAJ is a object oriented Ajax framework, created by Gilbert Hyatt, written in PHP5 for development of event driven PHP web applications. The framework follows 5 basic principles:

  • Simplicity: Everything can be done in PHP.
  • Various development models:
    1. Developer develops the whole application and interface in PHP
    2. Designer generate a pretty but dump page, and you then hook events to it to make it a real application
    3. You design an interface as a template (example Smarty), and have the framework make html, CSS, Javascript that you pore into the template
  • Event Driven
  • Late Binding of Events: no changes need to be made to the HTML themselves
  • Object Oriented: There are not only objects for the Ajax plumbing, but for page elements that you are interacting with

Example Code

<?php
require_once('../../CO.inc');

$html = CO::getTag('html');
$html->setTemplateFile('../templates/pajaj_examples.tpl');

$section = CO::getStyledTag('DivDropShadow', null, null);
$section->add(file_get_contents('content.htm'));
//$section->setWidth('100%');

$html->add($section);
$html->add(br());

print $html;

?>

Demos

pajaj-tabs

Related Content:

Posted by Dion Almaer at 2:33 am
4 Comments

+++--
3.8 rating from 19 votes

4 Comments »

Comments feed

This is very cool!

Comment by Ryan Brooks — October 27, 2005

jkl jkl

Comment by nico — January 13, 2006

This really looks good, but there’s no documentation at all. Maybe you can get some nice parts out of it though.

Comment by Dale — May 10, 2006

I’m starting work on my own PHP JSON writer, and I figured I’d look around to see if there’s something done already.

The code seems a bit unstructured, and cluttered, so I’m fairly certain I can do a cleaner job.

I have a new requirement: MINIMAL BOILERPLATE!

Comment by Omega — May 7, 2007

Leave a comment

You must be logged in to post a comment.