you’re on your way 4
23
next generation applications
That’s all the server sends back now? I’ll
bet my report will run faster with Ajax!
I’ll have my PHP guy take care of changing
the server-side script right away.
Katie’s server doesn’t
have nearly as much
information to send
back to her web form.
When you’re writing Ajax apps, the server doesn’t need to send all that
HTML back in its response. Since you’ll use JavaScript to update the web
page, all you need from the server is the raw data. In Katie’s app, that
means that all we want is the number of boards sold. Then, you can gure
out the cash that Katie has made with some simple JavaScript.
What the server should do now
1149
getUpdatedBoardSales-ajax.php
The URL to the
new, Ajax-ready
version of the PHP.
The total number
of boards sold.
A much happier,
stress-free server.