Wiley Beginning Ajax 978-0-470-10675-4 Benutzerhandbuch

Produktcode
978-0-470-10675-4
Seite von 30
1
Introducing Ajax
The path of history is littered with splits, branches, and what-if’s. The pace of development of
technology is relentless and often merciless. Past battles have seen VHS triumph over Betamax,
PCs over microcomputers, Internet Explorer (IE) over Netscape Navigator, and plenty more simi-
lar conflicts are just waiting to happen in DVD formats. It doesn’t mean that one technology was
necessarily better than the other; it’s just that one format or technology had the features and func-
tionality required at that time to make it more popular. You’ll still find enthusiasts now waxing
lyrical about the benefits of Betamax tape, claiming that it was smaller, had better quality and
such. It doesn’t mean they were wrong. Perhaps they were being a little sad and obsessive, but
beneath it all, they had a point. 
The evolution of the Internet has had its own such forks. One that continues to rumble is the so-
called “fat-client” versus “thin-client” debate. Briefly put, this is the choice between getting your
browser to do most of the work, as opposed to getting a server at the other end to do the process-
ing. Initially, in the mid-1990s, it looked as if the “fat-client” ideology was going to win out. The
introduction of IE 4 and Netscape Navigator 4 brought with them the advent of Dynamic HTML,
which used scripting languages to alter pages so that you could drag and drop items or make
menus appear and disappear without requiring a page refresh. Within a year, though, there was a
rush toward the “thin-client,” with the introduction of server-side technologies such as Active
Server Pages and PHP. The client-side techniques still exist, but the model of current Internet and
web page usage is broadly based on the server-side method of “enter your data, send the page to
the server, and wait for a response.”
When one format predominates in the stampede to adoption, you can often forget what was good
about the other format. For example, some aspects of page validation can be performed equally as
well on the browser. If you were to type “fake e-mail” into an e-mail textbox, you wouldn’t need to
go to the server to check this. JavaScript can perform a check for you equally as efficiently, and
also much more quickly. While plenty of people sensibly do validation on both client and server,
many pages attempt to perform the processing only on the server. If there has been one continual
bugbear about the Web, it is that it is slow. Timeouts, page-not-found errors, unresponsive buttons
and links haven’t gone away, despite the fact that bandwidth has increased tenfold. So, other ways
of addressing this sluggishness are becoming more common.
Companies have begun to reevaluate the way they are doing things to see if they can improve the
user experience on several levels  — making pages faster and more responsive, but also offering a
04_106754 ch01.qxp  2/9/07  6:15 PM  Page 1
COPYRIGHTED MATERIAL