Today I have found a new open source framework tool to help you wright clean AJAX code. It is ironically called Clean AJAX. Below are a few points from their site on Clean Ajax telling you what it is and what it is not.
What Clean is:
* Server side technology agnostic, you can use it with any server side language;
* Simple to install, to configure and to use;
* Small learning curve solution;
What Clean is not:
* A DHTML widget framework with AJAX features embedded on it;
* A huge and complex framework that claims to be the main artifact in your applications;
* A toy implementation wrapping XMLHttpRequest and ActiveX.
Clean AJAX is open source so you can modify it to fit your own needs. This site is a little scarce on documentation, but is is very easy to figure out once you get it downloaded. Clean AJAX supports web service access such as SOAP, XML-RPC and JSON-RPC. If you are having any trouble getting Clean Ajax installed or configured, you can find a great deal of help on their Source Forge help forum.