jQuery makes Ajax so easy a monkey could do it
I’ve been a big fan of jQuery, ever since I descovered it about 6 months ago. I’ve had loads of fun plugging in all the neat scripts and pluggins
I’ve found on sites like Ajaxrain.com. But the thing that’s most impressed me lately is how easy it makes programming Ajax driven features on website! Ajax is one of those things that isn’t actually all that complicated in itself, you simply use Ajax to make a call to a script on your server most likely written in PHP, then handle the response back from the script. The thing I like about jQuery is that it makes it all so neat and tidy. You don’t have to worry about any of the technicalities of the code, you just tell it where you script is, how you want to send the information (GET or POST) and the data you want to send. jQuery then handles the tricky bits for you. All you have to think about now is how you parse the data returned by your script.
Here’s a basic example taken off the jQuery site.
<code>
$.ajax({
type: “POST”,
url: “some.php”,
data: “name=John&location=Boston”,
success: function(msg){
alert( “Data Saved: ” + msg );
}
});
</code>
Taken from http://docs.jquery.com/Ajax
So there you have it! Easy peasy. There really aren’t a lot of excuses any more for not building intuitive, responsive user interfaces into
all your web applications.
Leaving the wonders of jQuery to one side for a moment, I thought I’d add a quick personal note as this is probably my last post on the existem blog… I’ve had a great time and it’s been a very insightful and fun 3 and a half years! But the time has come to spread my wings and move onto pastures new, as they say. So thanks to all the lovely people I’ve met and worked with over the past few years, don’t worry I’m not going far… You can find me over at 18aproductions.co.uk :)
Tally ho!
Tom

No replies to “jQuery makes Ajax so easy a monkey could do it”