AJAX is not a new technology, rather a combination of JavaScript and
XML. It allows for rich, dynamic websites built mostly from HTML and
Javascript.
Google popularised it's use quite a few years ago and since then it has
caught on. So what are the benefits and should you really be going out
your way to incorporate it?
AJAX has two huge benefits.
- Speed and invisibility, makes a web page seem 'smart' and provides a
realtime user experience
- Less resources used at the server end. Most of the processing is done
by the visitors web browser.
As an example. Imagine having a PHP page that POST's a username and
password to a server for processing. In this case all the data is sent
and the entire page is returned. Page sizes can range from 20k and
upwards. So in total you would be sending (back and forth) double that,
once for the visitor and once for the server.
By using AJAX the entire page is loaded once, then only the needed data
is pushed back to the server. In the above case once the visitor has
received the page, the only data sent back to the server is the username
and password, probably consisting of around 100 bytes. So as you can
see, the bandwidth and processing time saved is actually quite
substantial, especially when you consider the fact that these requests
are happening all the time.
There are many helpful libraries around to help AJAX developers. In
fact, Google has their own codebase specifically designed for this type
of thing over at http://code.google.com. It's very easy to incorporate
into your existing website and makes AJAX development a lot easier.
User experience is also very important when visiting a website. AJAX
enables a developer to turn their website into a responsive, real-time
application. Many sites have multiple pages and navigation links,
directing the user to different areas via different methods. Using AJAX
the user can stay on one single page and the data can be fed to them in
real-time without them having to navigate around the place. This also
reduces resource usage on the server and exponentially improves response
times.
Although all new technology should be approach carefully, the fact is
that AJAX is not new, it's just a clever combination of two existing and
thoroughly tested technologies.
XML. It allows for rich, dynamic websites built mostly from HTML and
Javascript.
Google popularised it's use quite a few years ago and since then it has
caught on. So what are the benefits and should you really be going out
your way to incorporate it?
AJAX has two huge benefits.
- Speed and invisibility, makes a web page seem 'smart' and provides a
realtime user experience
- Less resources used at the server end. Most of the processing is done
by the visitors web browser.
As an example. Imagine having a PHP page that POST's a username and
password to a server for processing. In this case all the data is sent
and the entire page is returned. Page sizes can range from 20k and
upwards. So in total you would be sending (back and forth) double that,
once for the visitor and once for the server.
By using AJAX the entire page is loaded once, then only the needed data
is pushed back to the server. In the above case once the visitor has
received the page, the only data sent back to the server is the username
and password, probably consisting of around 100 bytes. So as you can
see, the bandwidth and processing time saved is actually quite
substantial, especially when you consider the fact that these requests
are happening all the time.
There are many helpful libraries around to help AJAX developers. In
fact, Google has their own codebase specifically designed for this type
of thing over at http://code.google.com. It's very easy to incorporate
into your existing website and makes AJAX development a lot easier.
User experience is also very important when visiting a website. AJAX
enables a developer to turn their website into a responsive, real-time
application. Many sites have multiple pages and navigation links,
directing the user to different areas via different methods. Using AJAX
the user can stay on one single page and the data can be fed to them in
real-time without them having to navigate around the place. This also
reduces resource usage on the server and exponentially improves response
times.
Although all new technology should be approach carefully, the fact is
that AJAX is not new, it's just a clever combination of two existing and
thoroughly tested technologies.








0 Comments:
Post a Comment
<< Home