3D Game Programming

(C. Jardin) #1

CHAPTER 21


Getting Code on the Web


Since we’re programming a web language, it’s worth a quick look at how the
Web works. We’re not going into too much detail here—just enough for us to
understand why we do some of the things that we do in this book.

An Abstraction Is Worth a Thousand Words
You may have heard the phrase “a picture is worth a thousand
words.” Programmers like you and me do a lot of work in our brains.
When we’re thinking about a problem or trying to come up with a
cool new way of doing something, we use mental pictures of the
problem. These pictures in our brains are called abstractions.

Abstractions don’t always have a ton of detail. They usually have
just enough to help us understand the problem. An abstraction for
a cloud might be that it’s made up of a whole bunch of cotton balls.
That’s enough of a mental picture to understand the shape and
appearance of a cloud, and sometimes that is all we need.

But abstractions don’t always suffice. If we try to understand why
a cloud produces rain, the idea that clouds are made of cotton balls
won’t help at all.

Keep this in mind as we talk about the Web. We’re using abstrac-
tions, and they will help most of the time. But sometimes they will
be wet cotton balls.

When you’re done with this chapter, you will


  • Have a better idea of the parts that make
    up a website

  • Understand what we need to build our own
    websites

  • Know how to put a project on a site like
    Tumblr


Prepared exclusively for Michael Powell report erratum • discuss

Free download pdf