Table of contents for Ajax : creating Web pages with asynchronous JavaScript and XML / Edmond Woychowsky.

Bibliographic record and links to related information available from the Library of Congress catalog.

Note: Contents data are machine generated based on pre-publication provided by the publisher. Contents may have variations from the printed book or be incomplete or contain other coding.


Counter
 Preface
Chapter 1	Types of Web Pages
Chapter 2	Introducing AJAX
Chapter 3	HTML/XHTML
Chapter 4	JavaScript
Chapter 5	AJAX using HTML and JavaScript
Chapter 6	XML
Chapter 7	XMLHTTP Request
Chapter 8	AJAX using XML and XMLHTTP Request
Chatper 9	XPath
Chapter 10	XSLT
Chapter 11	AJAX using XSLT
Chapter 12	Better Living Through Code Reuse
Chapter 13	Traveling with Ruby on Rails
Chapter 14	Ruby
Chapter 15	The Essential Cross-browser HTML DOM
Chapter 16	Other Items of Interest
[Authors/Editorial: The following segments are arranged following the Chicago Manual of Style 
book conventions.]
[Begin Foreword]
No Foreword
[End Foreword]
[Begin Preface]
(b)Preface
The purpose of the book that you hold in your hands, AJAX: Creating Web Pages With Asynchronous 
JavaScript and XML, is simply to show you the fundamentals of developing AJAX applications. 
What This Book Is About
For the last several years there has been a quite revolution taking place in web applications development. 
In fact, it was so quite that until February 2005 this revolution didn?t have a name, even among the 
revolutionaries themselves. Actually, beyond the odd mention of phrases like XMLHTTP Request Object, 
XML or SOAP, developers didn?t really talk about it much at all, probably out of some fear of being 
burned for meddling in unnatural forces or some such. But, now that the cat is out of the out of the bag 
there is no reason not to show how AJAX works.
 Because I am a member of the ?we learn by doing? cult, no Kool Aide required, you?ll find more 
code examples than you can shake a stick at. So, this is the book for those people that enjoyed the labs 
more than the lectures. If enjoyed is the wrong word please feel free to substitute the words ?learned more 
from? for ?enjoyed?. 
 Until the last year the ?we learn by doing? group of developers was obscured by the belief that a piece 
of paper called a certification meant more than hands-on knowledge. I suppose in a way it did, 
unfortunately when jobs became fewer and further between developers began to collect certifications the 
way that Imelda Marcos collected shoes. While encyclopedic knowledge helped in getting interviews and 
subsequent jobs, it really didn?t help very much in keeping those jobs. However, now that the pendulum 
has begun to swing in the other direction it is starting to become more important to actually know a 
subject than to be certified in it. This leads to the question of ?Why learn AJAX?? 
 The answer to that question can be either short and sweet or as rich and varied as the concept of 
AJAX itself. Let?s start with the first answer, because it looks good on the resume. We all know that when 
something looks good on the resume it helps to keep us in the manner in which we have become 
accustomed, living indoors and eating regularly. Couple this with the knowledge of actually having 
hands-on knowledge and the odds of keeping the job are greatly increased.
 The rich and varied answer is that, to parrot half of the people writing about web development trends, 
AJAX is the wave of the future. This of course leads to the statement ?I heard the same thing about 
DHTML and nobody has talked about that for five years.? Yes, some of the same things were said about 
DHTML, but this time it is different.
 The difference is that this time the technology has evolved naturally instead of being sprung upon the 
world just so developers could play buzzword bingo with their resumes. This time there are actual 
working examples beyond the pixie dust following our mouse pointers around. This time the companies 
using these techniques are real companies with histories extending beyond last Thursday. This time things 
are done with a reason beyond the ?it?s cool? factor.
What You Need to Know before Reading This Book
This book assumes a basic understanding of web development techniques beyond the WYSIWYG drag 
and drop that is the current standard. It isn?t necessary to have hand-coded HTML, it is only necessary to 
know that HTML exists. This book will, hopefully, fill in the gaps so that the basics of what goes where 
can be performed.
 Beyond my distain for drag and drop method of web development there is a logical reason for the 
need to know something about HTML, basically where going to be modifying the HTML document once 
it is loaded in the browser. Nothing really outrageous will be done to the document, merely taking 
elements out, putting elements in and modifying elements in place.
 For those unfamiliar with JavaScript it isn?t a problem, I?ve taken care to explain it in some depth 
because there is nothing worse than needing a second book to help understand the first book. Although, 
thinking about it now I missed a wonderful opportunity to write a companion JavaScript volume, Doh! 
 If you?re unfamiliar XML don?t be put off by the fact that AJAX stands for Asynchronous JavaScript 
and XML, because what you need to know is in here to. The same is also true of XSLT, which is a 
language used to transform XML into other forms. Think of Hogwarts and you get the concept.
 In this book the evolution, or if you prefer, intelligent design of AJAX is described from the 
beginning of web development through the Dynamic HTML right up to Asynchronous JavaScript and 
XML. Because this book describes a somewhat newer technique of web development using a recent 
vintage web browser such as Firefox or Flock is a good idea. You also need an Internet connection.
How This Book Is Laid Out
Here is a short summary of this book's chapters.
[lb]	Chapter 1, Types of Web Pages, provides a basic overview of the various ways that web 
pages have been coded since the inception of the web. The history of web development is 
covered beginning with static web pages through dynamic web pages. In addition, the various 
technologies used in web development are discussed. The chapter closes with a discussion on 
browsers and the browser war.
[lb]	Chapter 2, Introducing AJAX, introduces AJAX with an account of what happened when I 
demonstrated my first AJAX application. The concepts behind AJAX are described and then 
are introduced in a step-by-step manner, from the first primordial AJAX relatives to the 
current evolution.
[lb]	Chapter 3, HTML/XHTML, describes some of the unmentioned basic building blocks of 
AJAX, HTML/XHTML as well as Cascading Style Sheets.
[lb]	Chapter 4, JavaScript, serves as an overview of JavaScript including data types, variables and 
operators. Also covered are flow control statements, recursive functions, constructors and 
event handlers.
[lb]	Chapter 5, AJAX using HTML and JavaScript, describes one of the earlier ancestors of 
AJAX. Essentially it is how to fake it using stone knives and bear skins. While the technique 
described is somewhat old-fashioned it serves to demonstrate, to a degree, how processing 
flows in an AJAX application. In addition, the ?dark art? of communicating information 
between frames is covered. Additionally, in an effort to appease those that believe that this is 
all old-hat the subject of stored procedures in MySQL is also covered.
[lb]	Chapter 6, XML, covers XML, particularly the parts that come into play when dealing with 
AJAX. Elements, attributes and entities, oh my, as the various means to describe content, 
Document Type Definitions and Schema are covered. Also included are cross-browser XML 
Data Islands.
[lb]	Chapter 7, XMLHTTP Request, dissects the XMLHTTP Request object by describing its 
various properties and methods. Interested in making it synchronous instead of asynchronous? 
You?ll find the answer in this chapter. In addition, both web services and SOAP are discussed 
in this chapter. 
 [lb]	Chapter 8, AJAX using XML and XMLHTTP Request, covers what some might consider 
pure AJAX, with special attention paid to the XMLHTTP Request Object that makes the 
whole thing work. Additionally various back ends are discussed ranging from PHP to C#. 
Also covered are two of the more popular communication protocols: RPC and SOAP.
[lb]	Chapter 9, XPath, covers XPath in detail. Starting with the basics of what is often considered 
XSLTs flunky, this chapter describes just how to locate information contained in an XML 
document. Included in this chapter is a detailed description of XPath axis, which is at least 
worth a look.
[lb]	Chapter 10, XSLT, goes into some detail about the scary subject of XSLT and how it can be 
fit into a cross-browser AJAX application. Starting with the basics and progressing to the 
more advanced possibilities, an attempt is made to demystify XSLT.
 [lb]	Chapter 11, AJAX using XSLT, takes the material covered in the first four chapters the next 
logical step with the introduction of XSLT. Until relatively recently this was typically 
considered a bad idea. However, with some care this is no longer the case. XSLT is one of 
those tools that can further enhance the site visitor?s experience.
[lb]	Chapter 12, Better Living Through Code Reuse, introduces a homegrown client-side 
JavaScript library which is used throughout the examples shown in this book. While they 
don?t necessarily have to be used, they provide an annotated example of what goes on behind 
the scenes with most of the AJAX libraries currently in existence. 
[lb]	Chapter 13, Traveling with Ruby on Rails, is a gentle introduction to the Open Source Ruby 
on Rails framework. Beginning with where to obtain the various components and their 
installation, the chapter then shows how to start the WEBrick web server. Following those 
examples a simple page that accesses a MySQL database is demonstrated.
[lb]	Chapter 14, Ruby, looks a little deeper into Ruby on Rails with the introduction of a simple 
AJAX application that uses the built-in Rails JavaScript library.
[lb]	Chapter 15, The Essential Cross-browser HTML DOM, describes the dark and mysterious 
realm of the cross-browser HTML Document Object Model. Another unmentioned part of 
AJAX, the HTML DOM is essentially how the various parts of an HTML or XHTML 
document are accessed. This is what makes the ?only update part of a document? feature of 
AJAX work.
[lb]	Chapter 16, Other Items of Interest, describes some of the resources available via the World 
Wide Web. These resources range from pre-written AJAX-capable JavaScript libraries to 
some of the numerous browsers available for you personal computer.
Conventions Used In This Book
Listings, code snippets, and code in the text in this book are in mono-spaced font. This means that the 
code could be typed in the manner shown using your editor of choice, the result would appear as follows:
if(enemy = ?troll?)
 runaway();
 [End of Preface]
[Begin Acknowledgments Page]
(b)Acknowledgments
Even though this book is essentially "my" book, it has been influenced in many ways (all of them good) 
by multiple individuals. Because the roles that each of these individuals played in the creative process 
was very significant I would like to take the time to thank as many of them that I can remember here.
Mary Ann Woychowsky for understanding my "zoning-out" when writing and for playing Morrowind, 
thus removing that distraction. Benjamin Woychowsky for asking "shouldn't you be writing?" whenever I 
played a computer game. Crista Woychowsky for disappearing with entire seasons of Star Gate SG-1, 
after catching me watching them when I should have been writing.
Eric Garulay of Prentice Hall for marketing this book and putting me in touch with Catherine Nolan. 
Catherine Nolan of Prentice Hall for believing in this book and for her assistance in getting started with a 
book. Bruce Perens for his belief that because I use Firefox that I had not tread too far down the path that 
leads to the dark side. Denise Mickelson of Prentice Hall for making sure that I kept sending chapters in. 
Chris Zahn of Prentice Hall for his editing, answering my often bizarre questions and his knowledge of 
things in general. Any errors remaining are solely my own.
I would like to thank the late Jack Chalker for his assistance with what to look for in writing contracts and 
for essentially talking me through the process using words that I could understand. Also for his writing a 
number of science fiction novels that have influenced the way that I look upon the world and in the end 
everything is about how we look upon the world.
Dossy Shiobara for answering several bizarre questions concerning MySQL.
Richard Berens for his assistance in formulating my thoughts.
Joan Suski for making sure that I didn't go totally off the deep end when developing many of the 
techniques used in this book.
Premkumar Ekkaladevi who was instrumental in deciding just how far to push the technology.
Jon (Jack) Foreman for explaining to me that I can't know everything.
David Sarisohn who years ago gave a very understandable reason as to why code shouldn't be obscure.
Finally to Francis Burke, Shirley Tainow, Thomas Dunn, Marion Sackrowitz, Frances Mundock, Barbara 
Hershey, Beverly Simon, Paul Bhatia, Joseph Muller, Rick Good, Jane Liefert and Bill Ricker for 
teaching me how to learn.
 [End Acknowledgments Page]
[Begin About the Author Page here if that page is to appear in frontmatter. It may appear in 
backmatter instead. Discuss at RTP.]
(b)About the Author
A graduate of Middlesex Country College and Penn State, Edmond Woychowsky began his professional life at 
Bell Labs as a dinosaur writing recursive assembly language programs for use in their DOSS order entry system. 
Throughout his career Ed has worked in the banking, insurance, pharmaceutical and manufacturing industries slowly 
sprouting feathers and evolving into a web developer. Best known for his often unique articles on the TechRepublic 
web site as well as his ability to explain how Muenchian grouping works in small words. Currently he can be found 
working in New Jersey as a consultant, applying both AJAX and XSLT to problems in often bizarre ways and 
looking forward to his next meal.
 [End About the Author Page]
[End of Front Matter (Preface and/or Intro will be placed in the book following the front matter)]
[Authors/Editorial: If you would like any other ?special? elements in the front matter, please 
include them here.]

Library of Congress Subject Headings for this publication:

Web sites -- Design -- Computer programs.
Ajax (Web site development technology).
JavaScript (Computer program language).
XML (Document markup language).