Asynchronous JavaScript And XML is a strange little beastie. It's a concept that all modern web browsers can exploit in order to make client-server applications that run in the browser but don't require a page re-load each time you do something - yet it's not all that well-known or well-used.
The average browser-based application
If you want to produce a browser-based application that uses resources on a server, there have traditionally been two models you could use. First, you can produce a standard web application, which has HTML pages as the GUI and which, whenever you click something, calls the server with a URL and/or some parameters and their values in order to do the requested task and get a new screen of information. Alternatively, you can write your program as some kind of downloadable applet (typically in Java if you want it to run on multiple client platforms).
You can, of course, do some client-side operation in order to avoid the delays of having to make a page request to the server every time you do something. It's common to use JavaScript to do things like checking the validity of form input, for example, or perhaps to manipulate imagemaps (clickable images where what the system does depends on whereabouts in the image you clicked). You can also do some more advanced client-side stuff (such as making page elements visible or invisible on demand, changing colours or whatnot, using Dynamic HTML concepts).
What not many people know, though, is that you can in fact implement an entire client-server application using JavaScript. Want to check that a customer record exists, or process a credit card payment, or handle a purchase, without having to do a page refresh? No problem.
The XmlHttpRequest object
In order to produce a client-server application, you clearly need the ability for the client application to communicate "behind the scenes" with the server - that is, to make an IP connection or similar and have some kind of discussion with the server that the browser (and the user) aren't really aware of. The way to do this is the XmlHttpRequest object.
The name of this thing pretty well explains what it does. It makes an HTTP connection to the specified server, sends a request, and receives a reply that you can then dig through in order to pull out the data you asked for. The thing to bear in mind, though, that this HTTP request isn't a page access - that is, you're not clicking a link on the web page and loading a new page from the server. Instead, it's simply the JavaScript making a connection to a server somewhere (which isn't even necessarily the Web server the page came from) which just happens to be on port 80 and just happens to use the HTTP protocol because these are (a) well-understood; (b) ubiquitous; and (c) generally permitted through firewalls.
The good bits and the bad bits
AJAX's main benefit is that you can significantly enhance the look-and-feel of browser-based applications by massively reducing the number of page loads, and without having to make the user download some kind of widget such as a Java applet (which requires a JVM to be installed on the client) or an ActiveX object (which is platform-specific and will be blocked by many people's browsers). But are there any downsides? Of course there are - there's no such thing as a perfect concept in computing. We'll look at the three main ones.
Discover how SOA can create smarter outcomes for your business.
Attend and learn:
- How SOA is helping leading companies to become more agile
- Where you should be applying SOA processes in your company
- The top SOA implementation mistakes to avoid
Click here for more information.
- +
Computerworld Live Podcast #97: The Future of Enterprise Networking 25/07/2008 09:45:36
This week CW Live chats with Mark Thompson, global sales and marketing manager for HP ProCurve, on the future of the enterprise networking. Mark discusses the trends we can expect to see in the near future and how the right infrastructure can ensure your enterprise network is secure. - +
Computerworld Live Podcast #96: Security at the Edge 11/06/2008 09:22:22
CW Live speaks with Amol Mitra, HP ProCurve Director of Marketing for Asia Pacific and Japan. Today's topic: how enterprises are starting to shift away from simply controlling security via server logins, firewalls and moving to more adaptive security frameworks. - +
Data Management Edition #10: Multi-Petascale Systems 02/05/2008 09:12:33
This week we look at sustainability and the development of multicore technologies to build multi-petascale systems. - +
IT Security Edition #11: How to poison the Storm botnet 01/05/2008 08:51:55
This week CW Live presents a case study on how to poison the notorious Storm botnet . Plus we take a look at Cisco's plans for Ironport. - +
IT Security Edition #10: Cyber-battles fought and won 24/04/2008 11:09:47
Vendors bow to end user pressure to improve product security, and we take a look at the latest concepts shaping the cyber-battlefield of the future.
Fortinet November Threatscape Report Shows Calm Before Holiday Storm 2008-12-05 16:00:00+11
Epicor® Cited as an Order Management Solutions Leader by Independent Research Firm 2008-12-05 15:52:00+11
F-Secure: Growth In Internet Crime Calls For Growth In Punishment 2008-12-05 13:00:00+11
International researchers gather in Sydney to preview the clever web 2008-12-05 09:48:00+11
Borderless corporate networks to shift focus to secure content management in Australia in 2009 2008-12-04 16:06:00+11
Delivering the Power of Choice with Microsoft Dynamics CRM
Join Ed Thompson, Research VP, featured analyst firm, Gartner, Inc., and Brad Wilson, General Manager CRM Microsoft Dynamics, for a new webcast, Delivering the Power of Choice with Microsoft Dynamics CRM, available now. Our panel will break down the best practices for getting the most out of CRM and you'll learn key recommendations you can implement in your organization. Additionally, you'll also hear Microsoft's vision for CRM.












