Ajax in Action excerpt: The Page as an Application

Java Development News:

Ajax in Action excerpt: The Page as an Application

By David Crane and Eric Pascarello

01 Aug 2005 | TheServerSide.com

Ajax applications can contain much more client-side code than a standard web application, and hence benefit much more from the order that patterns and refactoring bring. Chapter 4 of Manning’s Ajax in Action is the first of three chapters that apply refactoring and patterns to the client-side codebase. You won't see much of the asynchronous requests that give Ajax its name in this chapter, but the style of programming that we're discussing here is a direct consequence of being able to make asynchronous requests.

This chapter is about structuring Ajax applications. It provides examples of how the well-established Model-View-Controller pattern can be used to provide that structure. This first installment of Chapter 4 covers the display aspects of the application, and shows how normal JavaScript code can be refactored into a robust view component.

Download Ajax in Action - Chapter 4, Part 1

For more information on Ajax in Action go to www.manning.com/crane.


Dave Crane holds degrees in Chemistry, Parallel Computing, and Ecological Economics from Edinburgh University in Scotland. He has worked with Internet technologies for the last ten years, primarily with Java technologies such as J2EE, Jini and Jython. He has pushed the boundaries of DHTML, and latterly Ajax, since 1997, in web site design, on early Digital TV set-top boxes and in home automation systems. Most recently, he has been senior developer for Smartstream Tchnologies Ltd., developing highly-interactive Ajax-based application frameworks that are currently in use in many tier-1 banks and financial institutions worldwide. Dave lives in Gloucestershire, UK.

Eric Pascarello graduated from Penn State University in 2002 with a B.S. in Mechanical Engineering. Since then Eric has been employed as a Senior Developer working with enterprise level applications in ASP.NET. Eric has also written "JavaScript: Your visual blueprint for dynamic Web pages (2nd ed)". Eric volunteers his free time as a moderator of the HTML and JavaScript forum at www.JavaRanch.com, a friendly online community dedicated to helping people learn Java and other web technologies. He lives in Laurel, MD.