A passionate programmer’s findings in the world of internet.

xajax: Ajax Made Simple

January 4th, 2006

I'm one of the programmers who have heard of Ajax, learnt theorectically how Ajax works, but haven't really produced any Ajax-powered site. If you are somebody like me, I recommend you to take a look at xajax.

xajax is an open source PHP class library that allows you to easily create powerful, web-based, Ajax applications using HTML, CSS, JavaScript, and PHP. Applications developed with xajax can asynchronously call server-side PHP functions and update content without reloading the page.

Looking at the samples in the site, I find that it's actually a lot simpler to write and organize your Ajax programs by utilizing the class. Also, with the script, you don't have to worry about Javascript codes.

All you need to write are the following PHP scripts:

  1. A server file to define all the functions that you might require.
  2. A common file to register all your functions.
  3. An user input form in plain HTML with a few lines of common Javascript.

If you are not a beginner in Ajax, I hope you would give some expert comments on the script.

If my article helped you solved your problem, consider buy me a beer!

Share this article: del.icio.us | digg it


Related posts:

2 Responses

Leo says:

Have you looked at prototype.js, it has quite a nice ajax class which is easy to use. It also has a few extra functions to make programming dynamic sites a little easier.

Daniel P Dykes, Rogue Connect says:

Xajax is a fantastic class, so damn easy to use! We’ve already implemented it into Rogue Connect’s folksonomy tagging tool, and I have to say it was so damn easy to do because it was 99.9% PHP. We’re now using it to redevelop and enhance other areas of the site, particularly the membership application where we’ll use it for ‘live’ validation.