Skip to Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner to intermediate
448 pages
13h 33m
English
O'Reilly Media, Inc.
Content preview from Head Rush Ajax
you’re on your way 4
345
xml requests and responses
Filling that XML prescription
Trying to come up with a data format that works for the server, that the browser
understands, and that won’t have to change if Katie adds another product line or changes
the order of items on her report... that’s not so easy.
Luckily for us, Dr. Zigmund (as well as that rather impatient girl on the last page) seems
to have a solution: XML, the extensible markup language. Using XML, we can come up
with a simple response format that is clear, and contains all three updated sales totals.
Q:
What’s so great about XML?
A: The biggest thing going for XML
is that it’s a recognized standard. Some
folks at the World Wide Web Consortium
(or the W3C for short) define what makes
XML, well, XML. And since most people
agree to abide by the W3C standard,
browsers, servers, and programs like PHP
scripts can all use XML without wondering
what a bracket or a semicolon means.
Q:
I still don’t see why it’s so bad
to just make up our own data format.
Wouldn’t that be easier?
a: It might seem that way, but
proprietary data formats—formats that
you make up for your own use—can
really cause a lot of problems. If you
don’t document them, people forget
how they work. Even worse, some of
the characters you might use, like a
semicolon or comma, can have more than
one meaning, and they make the format
confusing to programmers.
Q:
I g ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally

Publisher Resources

ISBN: 0596102259Errata PageSupplemental Content