It seems like you are using an ad blocker. To enhance your experience and support our website, please consider:

  1. Signing in to disable ads on our site.
  2. Sign up if you don't have an account yet.
  3. Or, disable your ad blocker by doing this:
    • Click on the ad blocker icon in your browser's toolbar.
    • Select "Pause on this site" or a similar option for INITAcademy.org.

Web Development Starter Kit

Course by zooboole,

Last Updated on 2022-10-08 03:55:32

So, what is a website?

We are getting closer to the goal —starting web development. If we are going to be web developers, it's important we know what exactly a website is in the first place. After all, that's what we're going to be building all the time. So, in this section, we will take a moment to understand websites.

You can write "website" or "web site"

At the server-side

In previous sections, we've looked at what the Internet is, what the web is, and how they relate. We then looked at what servers and clients are, and how they relate as well. Now it's time we dive into the server and see how the resources they host are organized and work.

When a web server such as Apache is installed, it sets a specific folder called the web root that contains resources(images, text files, videos, etc.). That way, when a client makes a request, the server knows where to find the information requested. That helps it avoid searching the entire hard disk of the server, which would have been overkill.

But you may wonder if this is the only way to access information on the server, or if it is only inside the webroot that we can access the server resources? What about other information the server may contain, such as software services or even a print function? And how does the server make the difference between all this?

You are right to be confused here. The whole thing is that the server(the entire machine) can host many services such are web services(meaning information that can be accessed through the web), file-sharing services, printing services, etc. In all cases, accessing those services on the server starts with a request. But how we formulate the request varies from one service to another, and there are different protocols defined for each one of them. For example, the FTP protocol allows file sharing, and an FTP request string looks like the HTTP request string: ftp://server/resource. The only difference is the protocol.

This means that a server(machine) can host many server applications. To differentiate which server application a request is sent to, the server has given a door number to each server application. This door number allows it to know exactly which server a request is meant for. Technically, this door number is called a port. For example, the default port for the HTTP protocol is port 80. So, when you make an HTTP request through your browser, you also need to specify the port so that the server knows how to forward your request to "the web server", but not to the file-sharing server. The request in that case looks like this: http://server:port/resource. Example: http://google.com:80/jobs.

You might ask why we didn't do that in the previous section. The reason is that you don't need to add the port number. Your browser is smart enough to add it for you before sending the request to the server.

Now you understand that the server targets the web root because it knows that we are making a web request through the port and the protocol. Now, let's bring the ball on the ground and look inside that webroot.

Inside that webroot folder, the server keeps various files and optionally other sub-folders. Those files are linked to each other just like the books we spoke about previously. They are linked to each other through "pointing-keywords" texts. Each one of those keywords in a resource points to another resource, and the inverse can be done as well. These types of linking are called hyperlinks. They transform the resources they link into a consolidated resource. A set of many resources logically linked to each other to make up a bulk of information. In such a set, accessing any of them can also lead you to others. Rules and conditions can be defined for how you can request some part of the set. In addition, a resource of the set must be presented in a specific format or language called HyperText Markup. There is a special programming language created to help you create those types of files. The language is called HyperText Markup Language(HTML). We will learn how to use it in chapter three.

Such a bundle of resources specially encoded, linked with hypertext links, and hosted by a web server which serves them when requested, is called website. It's like a construction site, where civil engineering works go on. Or a gaming site where people gather to play games. A website is a place on the server where resources are put together and interrelated with hyperlinks in order to serve one purpose of passing one message in a specific fashion.

At the client-side

A website on the client-side is seen as a virtual document accessible via a URL. We just saw above that the website is a set of resources linked by hypertext links, making them a bundle of resources, just like a unit of information. The question one might ask right now is to know how we visualize such a bulk of information when we request it from a server. Do we see them all at once, or one by one? Of course, we can't see them all at once. We don't have such abilities as humans. So we can only see them one by one. In fact, that's one of the reasons why we needed to link them through hyperlinks so that we can move from one to another. When we make a request to the server, we need to be specific about where we want to start accessing the bulk of information.

So, when you make a request to a server such as http://google.com, you are presented on the window of your browser with a virtual paper that has text, images, colors, etc, all arranged in a given fashion. It's just like a book page. It's called a web page. When you go through that page, you can see that there are parts(text, or images) of it on which you are allowed to click(your mouse changes into a hand), those parts are hyperlinks. The entire page you see on your window is a document or generally seen as a website. At the client-side, when we say "we are visiting a website", we request a server to serve a file of the website, which is then presented to us as a document. So, we only see one part of the website at a time on the client-side. We can now use the hyperlink to navigate through other resources that make up the entire website.

You can now see that the idea of a website varies based on the perspective(server-side or client-side) from which you are. At the client side, we deal with a presentation of resources that are hosted on servers as encoded files. The fashion in which they are presented is defined by the HTML that's used to encode them.

At the server-side, a resource is a file, but that file is called a document at the client-side, and a document can have many resources(such as images, text, videos, songs, etc) displayed on it.

If we have to be specific about a resource we are requesting, then when we ask http://google.com, which resource are we requesting? How does the server know which file to serve(or present to the user) first? Well, the web server is configured to serve specific files in the website's resources in case a specific file is not indicated explicitly. Those files are usually named index or default. They may have any web extensions such as .html, .php, or .asp, etc.

You will learn more about them in more detail in chapter three when we start to learn how to create websites. The activity of creating a website is called web development. In the next chapter, we are going to explore more about that job.