Thinking in layers

This page’s goals

On this page, you’ll learn how make it easier to think about messy tech.

The problem

Web tech is complex. Lots of pieces, all connected together.

Don’t try to understand it all at once. You’ll just get confused. Everyone does.

You need a way to break the Web up into chunks. Then you can understand each chunk by itself. That’s what this lesson is about.

Alison and the light layers

Here’s Alison.

Alison

Here’s Alison dancing to the light of her favorite lamp.

Alison dancing

Alison doesn’t think much about her lamp. If she needs light, she turns it on. If not, she leaves it off.

Alison knows how the lamp works. She knows about bulbs, electricity, switches, and stuff. But normally she doesn’t think about all that detail. Too dark? Turn the lamp on. That’s all she needs to do.

Only when the lamp doesn’t work does Alison need to think more. Suppose she hits the switch and nothing happens. She remembers what she know about lamps, and first checks to make sure the lamp is plugged in. It is. OK, how about the bulb? Aha! It’s burned out. Get a new one, put it in, turn on, and dance, baby, dance!

Alison thinks about the lamp in layers. She normally thinks at the on/off layer:

Lamp layers

The on-off layer is simple. The lamp is on, or it’s off. That’s it. Thinking at this layer doesn’t take much time, or much learning. And it’s useful. When Alison has the goal “get light,” the on-off layer is all she needs to think about.

But if the lamp doesn’t work, then Alison thinks about the lower layer. Bulbs, plugs, and stuff. Things she can usually ignore.

We think in layers all the time. Cars, stereos, even our bodies. Life is easier when you can ignore details. Our brains would get clogged if we had to keep all of the details in mind all of the time.

Web layers

The Web is like that, too. It’s best to ignore the details most of the time. But if you want to create and maintain Web sites, you need to understand what’s going on under the hood. Just a little bit.

You don’t need to know all of the details about how, for example, the bulb works. You don’t need to know what gas is in the bulb, or what the filament is made from. You just need to know enough to buy the right bulb at the store.

We’ll talk about the Web in three layers:

Layers

The top layer is where users get useful information. Web pages about dog food (yum!), treats (yummier!), and such. That’s the layer most people work in most of the time.

The middle layer is about how computers send information to each other. The bottom layer is all the geeky electronics and stuff.

CC
CC

Is there really a layer called “bucket o’ numbers?”

Kieran
Kieran

The layers are just ways of thinking about what is going on. I made up this three-layer stack for CoreDogs.

Other writers use different stacks, depending on how detailed they want to get. Talk to a geek, and you might hear about seven layers. But CoreDogs covers only the most important stuff. Three layers is enough for that.

Summary

The Web is complex. Lots of pieces.

It’s easier to think about it in layers. When you think about one layer, you can ignore the others.

The Web has three layers: display, service, and bucket o’ numbers.

What now?

Let’s talk about the lowest layer.


Lessons

User login


Dogs