Learning by doing is a key if you want to benefit from this book. Since the target audience is the developer community, much of this book consists of examples using DWR in action. Chapters 1 to 3 introduce the main features of DWR, and discuss how to get the development work started. Chapters 4 to 7 are full of sample code, and focus on the source code samples and applications.
This chapter introduces AJAX technology and a widely used Java framework for building AJAX applications: Direct Web Remoting, commonly known as DWR. The introductory sections on both AJAX and DWR are brief since AJAX is already a well-known technology and most of us have at least heard about it and know what it stands for. The introduction to DWR is presented in a short "executive summary" before we dive into more details and examples on DWR in the later chapters.
The following sections are discussed in this chapter:
What is AJAX?
DWR: AJAX for Java Developers
The DWR Community
The principle idea of AJAX is in the word "Asynchronous". This feature enables rich a desktop-like user interface in the browser and enables interactive interfaces that can even replace traditional user interfaces. Communication between browser and server is done in the background. Moreover, as only the data is transferred between the browser and the server, AJAX applications are actually fast and responsive to users. The following figures display how a typical request-response application works (upper diagram), and how AJAX applications work compared to the request-response application (lower diagram).
The main component of AJAX technology is
XMLHTTP. The following link provides the details and history of
AJAX is dealt with in detail in many books such as Head Rush Ajax, a "brain friendly guide" to AJAX and also on Internet sites. Further, the assumption is that most of you already know AJAX and you are reading this book for reasons other than just learning AJAX basics.