38
Chapter 1
To gure out what’s going on, we’re going to have to step back a bit, and
think about web applications in general. When you think about a web
appl, you probably think about an HTML page, some JavaScript code, a
bit of CSS for style, and maybe a web server running some scripts or a
servlet. All these pieces work together, like this:
How we see web apps...
JavaScript
Request
Web Server
Response
<html>
.
.
.
</html>
h1, h2 {
fon
col
}
p {
HTML
CSS
You use HTML to say
what a web page is...
...and CSS
to say how
the page
should look.
The HTML and CSS get
combined into what we actually
see—the web page.
You use JavaScript to say
what a web page does.
The web server waits on
requests, and then sends
data back to your web page.
But there’s more going on than meets the eye...
PHP scripts, Java servlets,
Ruby programs, and other
server-side components.
<script>
var request...
function foo()
{
...
}
</script>
a simplistic view of web applications