2
Chapter 1
The Web, Reloaded
Are your customers tired of waiting around when they place an order on your
site? Are you getting complaints that every time a button is pushed, the page
reloads? Then it’s time to get with the program, and take your programming to
the next level. Welcome to the next generation of web apps, where JavaScript,
some dynamic HTML, and a little bit of XML can make your applications feel
like dynamic, responsive desktop apps.
Let’s take a look at the kind of applications you (and your customers) are used to:
The old way (think 1999)
Web Server
...and then the web server responds
to each request by sending back
a completely new HTML page,
updated with new data.
Users enter information into
HTML forms, and click buttons.
The browser sends a request to
the web server...
Not only do you have to wait on the server,
but each request/response means the entire
page is redrawn. Wouldn’t it be great if there
was a better way?
Then the whole process repeats
itself... again, and again...
Actually, we’re getting rid of
page reloads in this chapter...
Request
Request
Request
Response
Response
Response
Wow... in the time
it took for all those
pages to reload,
someone else already
put in a higher bid.
So much for the Web
being responsive!
traditional web apps