The Internet vs The Web

The Internet is simply a collection of computers connected with each other. The web emerges when this mega-network is used to deliver content: text, video, music, chat messages, etc. Web browsers like Chrome or Firefox are apps that communicate with other apps β€” web servers β€” to send and request information. And the internet is the underlying infrastructure that makes it possible.

Think of the internet as the system of roads, highways and traffic lights. Think of the web as the postal service. The postal service uses the roads. It would stop working if all roads suddenly vanished. But you can imagine them finding other ways to deliver mail, if needed.

For all practical purposes, many use the words "internet" and "web" interchangeably, but they are not the same thing. The good news is that the responsibility of web developers usually don't go into the land of the Internet.

Computer networking is a separate, complex topic. It is not essential to learn all the ins and outs right now, it will be enough to understand what networks are and what do people mean when they say "computers are connected".

I have a laptop on my desk, and there's another computer nearby. I want to read the document that’s stored on that other computer. What are my options? Well, I can use something like USB thumb drive, copy the file and transfer to my laptop. This was a common problem from the very beginning of computing. So engineers decided from early on to come up with a way to connect computers using wires.

It turned out to be really handy: you can transfer documents and all kinds of information, including commands, instructions for the other computer to run. For example, if my computer is not powerful enough but is connected to another more powerful computer, I can use its computational resources and accomplish something I couldn't have done myself.

Many organizations in the 60s started connecting their computers into networks. And then someone said "hey, why don't we connect our networks into a bigger network. A network of networks!" And that is exactly what Internet is: an inter-connected collection of networks.

Your computer, phone or tablet is most probably connected to the Internet right now. It means that it is a part of some small network that's connected to a bigger network that's connected to multiple bigger networks. That small network might be your local house network, your Internet provider's neighborhood network, your city and country networks, etc.

While we enjoy wireless connections all the time, most of the Internet is still a bunch of wires. There are thousands of kilometers of undersea cables that connect continents. It's quite amazing! And it's funny to think that connection problems on the Internet sometimes occur because of hungry fish.

Each computer connected to a network, be it a small local network or a global Internet, has a unique address called an IP address. Users don't deal with IP addresses, because 172.217.21.174 is not as convenient as google.com, but in order for computers to connect to each other, IP addresses are required. This is why there are special computer applications that run constantly on the internet and help other apps convert words like google.com into corresponding IP-addresses. You actually have at least a few of these applications running on your devices.

They are called DNS servers β€” Domain Name System servers, and you have one in your computer, one in your smartphone and probably one in your wifi-router. There are millions of DNS servers on the internet, and they communicate with each other in a specific way, which, again, goes beyond the scope of this book and course. But in the end of the day, they made it possible for us to forget about IP-addresses and only think in terms of human-readable, nice addresses like codexpanse.com or nasa.gov.

As you can imagine, it takes quite a bit of engineering to make it all work, especially considering how fast everything must be. During a normal day you can easily get millions and millions of pages of information from five continents without leaving your living room. But as web developers, we don’t have to think about this too much. When we create web applications we treat the Internet as a magical portal that somehow connects the client and the server.

In order to understand how the web works, we will explore the simplest web setup possible: two computers talking to each other via Internet.