72
Chapter 2
Diagramming the Break Neck app
Now that you know how customers will use the Break Neck app, let’s take
a look at what actually has to happen behind the scenes.
Man, Break Neck pizza rocks. There’s
nothing like a breakfast of cold pizza, a
whipped latte from Starbuzz, and the
Webville Times to read.
<script>
var request...
function foo()
{
...
}
</script>
JavaScript
Once the customer enters their phone
number, a JavaScript function is called.
<script>
var request...
function foo()
{
...
}
</script>
When the customer clicks “Order
Pizza”, his order and information
are sent to the Break Neck server.
Customer’s Phone Number
Customer’s Address
Customer’s Order
The server places the
order and creates a
delivery request..
The delivery request has
the customer’s order and
correct address on it.
The server looks up the
customer’s address and
returns it to the browser,
without any HTML.
While the server is looking up the
customer’s address, the customer
types in his pizza order.
The browser calls a
JavaScript function, which
then updates the web page
with the customer’s address.
The JavaScript sends the customer’s
phone number to the server, and asks
for that customer’s address.
break neck planning