JQuery – the next big Thing!

Jun 29, 2010 No Comments by admin

This article is to give an overview of Ajax and JQuery, and also showcases you on how JQuery has made Ajax development easier.

What is Ajax?

Do you ever want your web pages to make direct requests to web servers without reloading the page. Then Ajax(Asynchronous JavaScript and XML) is what you need to look out for. Lets get in depth with an theoritical example which can help you in construing things in a simple way.

Our Requirement.

You have a login from which consumes two things a login name and a password to be entered by the end user, upon matching you thrown back the user with a welcome screen or show an error stating login has failed.

Approach one – Standard Old way

In the old ancient way, you would be submitting the whole page to the webserver. This is what we have been doing for several years.

Approach two – Ajax

In our simplified approach, we would have the end user typing the login and password and submitting the form, you would have a JavaScript function that invokes an Ajax call that sends two parameters — the login name and password. The web server takes the two parameters and then queries to against the database to check out if there is any match. If there is a match found in your database, then the web server can return a success flag. Otherwise, the web server could return an error message. Next, you would check for the Ajax response, if the response is successful you would use window.location to send the user to their accound screen.

If the response contains an error message, the application can display the error on the screen without ever reloading the page.
The main thing to be noted here is that you don’t have to reload an entire page just to handle a login and password verification. It makes your application more responsive and saves you a lot of bandwidth.

JQuery – Making Ajax more simpler.

Developing Ajax applications with JQuery makes your life simpler. JQuery has put all the properties of Ajax into one simple API making you to control everything like url, synchronization, cache from one declaration. Apart from this it has a lot of Ajax functions that you can use which can further reduce development and debugging wee.

Get Started with Ajax + jQuery

If you have not used any JavaScript Web development framework like jQuery or DOJO yet, then here are some awesome links to look out for.

http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery

http://spyrestudios.com/simple-guide-how-to-get-started-with-jquery/

http://www.elated.com/articles/jquery-getting-started/

Tech Sambar

About the author

The author didnt add any Information to his profile yet
No Responses to “JQuery – the next big Thing!”

Leave a Reply