Traditionally Web application interfaces have been static in nature, lacking the high level of interactivity features commonly found in desktop applications. Web application interfaces have been limited in this regard because round-trips to the server and complete page refreshes were needed to update the state of the application. However, Web application development has been evolving significantly over the past few years, and one of the technologies that stands out most in the sea of innovation is AJAX. AJAX, or Asynchronous JavaScript and XML (the less commonly known basis for the acronym), is the name given to a technique used to develop dynamic Web application interfaces. AJAX introduces the ability to update the state of a Web application without requiring complete page refreshes. Instead of refreshing the entire page, AJAX allows discrete portions of a page to be updated asynchronously, thus enabling a Web application to look and behave very similar to traditional desktop applications.
This chapter provides a brief overview of AJAX that introduces the technologies and concepts behind it. Because there are so many approaches to implementing AJAX techniques in Web applications, a comprehensive review of AJAX is outside the scope of this book. Instead this chapter will highlight a very basic approach for using AJAX by integrating AJAX into the Mini HR application. Although quite simple, this example provides insight into the foundation that all AJAX-based frameworks use, such as the popular DWR (http://getahead.ltd.uk/dwr/) and Dojo (http://dojotoolkit.org/) frameworks.
As a point of interest, there are two Struts AJAX extensions available on the http://struts.sf.net/ site, AjaxTags and AjaxChat, which are useful for developing Struts applications that leverage AJAX.