We use Sajax for adding small Ajax code to sites. After running into a problem and doing some digging, it seems the library hasn't been updated since 2005.
I've appreciated Sajax for being lightweight, easy to use, and easy to install (just include the file in PHP).
So, on the LAMP stack, if you have used Sajax before, what would you upgrade to? Ease of use is key since some semi-programmer web developers use the code too.
I know a lot of people would say jQuery, but is that as simple as Sajax?
We use Sajax for adding small Ajax code to sites. After running into a problem and doing some digging, it seems the library hasn't been updated since 2005.
I've appreciated Sajax for being lightweight, easy to use, and easy to install (just include the file in PHP).
So, on the LAMP stack, if you have used Sajax before, what would you upgrade to? Ease of use is key since some semi-programmer web developers use the code too.
I know a lot of people would say jQuery, but is that as simple as Sajax?
Share Improve this question asked Jan 30, 2009 at 16:25 tkotitantkotitan 3,0092 gold badges34 silver badges37 bronze badges 1- yes it is dead; – sami Commented Feb 2, 2023 at 2:08
7 Answers
Reset to default 5I would say it is easier to use jQuery
.ajax
:
$.ajax({
type: 'GET',
url: './example.json',
dataType: 'json'
}).done(function (data) {
// Use data...
});
$.getJSON('./some.php', { q: 'thing' }).done(function (data) {
// Use data...
});
$.ajax({
type: 'POST',
url: './api.php',
data: {
action: 'save',
info: APP.getInfo(),
token: APP.getToken()
}
});
jQuery
is a great tool with lots of examples and plugins that allow you to do some pretty amazing things!
Sounds a lot like xajax
Correct me if I'm wrong but Sajax is a PHP library and jQuery is a javascript library. Just felt like that distinction needs to be made.
At our pany we use jQuery and I think it's absolutely fantastic. Wouldn't trade it for anything else. But I would advise you to try any of the other many javascript libraries (Prototype, MooTools, YUI) and find out which one works for you.
Or you could use S2ajax: http://github./Fusion/s2ajax/tree/master
I just finally got around to pushing it to Github :)
If you're looking for jQuery integration with PHP, there are some classes in the Zend Framework. See: http://framework.zend./manual/en/zendx.jquery.html
There is also my branch over at http://sajax.info/ it mainly just fixes the outstanding issues with 0.12 and focuses on speeding sajax up even more.
I remend jQuery. It's much more straight forward that Sajax, which tries to be both end points for you. Besides, it can get messy with output buffering sometimes.