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 lancecourse.com.

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 in the first place what exactly a website is. 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 what a website is.

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, they set 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 try to find the information requested. That helps it to 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 in the server, or is it only inside the webroot we can access the server resources? what about other information the server may contain such as software services or even 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 to which server application a request is sent for, 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 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 webserver" instead of 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 didn't we do that in the previous section? The reason is that you don't really 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 actually 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 — to 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 resource points to another resource and the inverse can be done as well. This type of linking is called hyperlinks. They make of the resources they link a consolidated resource. A one-set of many resources logically linked to each other to make up one bulk of information. In such a set, accessing any of them can also lead you to others. Rules and conditions can be defined in 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 bundle of resources specially encoded, linked with hypertext links, and hosted by a web server which serves them when requested, is called web site. It's like a construction site, where civil engineering works go one. Or a gaming site where people gather to play games. A website is a place in the server where resources are put together and inter-related 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 to 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(you 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) in 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 in a resource we are requesting for, then when we ask http://google.com, which resource are we requesting for? How does the server know which file to serve(or present to the user) first? Well, the webserver 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.