[Secure AJAX for PHP] SAJA

Why Use SAJA?

For those that aren't yet sold on this framework, I've tried to outline what makes SAJA so convenient to use.

SAJA is Simple.

I focused on making saja's ajax calls involve as little typing as possible, while being very simple and intuitive. Actually, you don't even need to learn anything new - just write your ajax function calls using PHP syntax. You don't have to "register" callbacks, "import" function names or any of the above. Just write your function, then call it.

SAJA is Secure

SAJA requests are only valid if the user is actually on the page that the request is coming from. For an extra layer of security, you can even encrypt the user's input before it is sent to your server for processing.

SAJA is Light-Weight

14k total. The only part that needs to be downloaded by the end user is 3.8k.


Let's face it, XML is heavy, and parsing it is not always simple. SAJA works by sending back only the data your application actually needs.

No JavaScript

Well... for the most part there's no javascript. You'll only have to write javascript if you're doing something less common, or if you want to write a custom callback.

Easy Debugging

Usually it is a pain to debug Ajax applications because you can't directly see what your server-side code is doing. With SAJA you can see any response from the server, even errors. If you have a parse error in your PHP, you will find it just as easily as if you were looking at the page itself.