70
Chapter 2
Break Neck Pizza, Ajax-style
Instead of starting with old 1990s development ideas, let’s look at what the Break
Neck app should do. Then you can use your new asynchronous programming skills
to make sure Break Neck’s order form is a responsive, customer-friendly means of
getting great pizza, fast. Here’s how things should work:
Yeah, come on over, the pizza’s
already here. Unbelievable... it can’t
have been ten minutes, and I didn’t
even have to enter my address.
The customer starts
out by entering his
phone number.
The order form then lls in the
customer’s address automatically.
Once the customer has
entered in his order, he
clicks “Order Pizza”...
...and Alex, the delivery
boy, can get the hot
pizza right to the
customer’s front door.
The customer enters their
pizza order into the form,
without waiting on their
address to get lled in.
an asynchronous approach