I’ve been frequenting the Web Hosting and Web Design subreddits of late.  Interestingly, I noticed that there are a fair number of questions about specific steps in the process of building a website.  It’s pretty clear from the nature of these questions that the individuals asking don’t really understand what some of this stuff is.  I remember being in their shoes.  Prior to starting this blog, I decided to build a website for my old Boy Scout troop.  And while I had a solid foundation (I could build a web server and site out of nothing), I had a lot of trouble finding something on the web to help explain how to go from a 1992 website using only HTML to a 2010 website with cool menus and dynamic content.  So, while I found the answers I was looking for, I have yet to find a helpful guide about how to go from nothing to a modern website.  Thus, I’ve taken matters into my own hands.  As the saying goes, “If you build it, he will come.”  So, without further ado, I give you my guide to building a modern website.

Let’s start with the basics.  In order to understand how to build a modern website, you first need to understand how the internet works.  At it’s most basic level, the internet is a very large network of computers.  These computers have different roles based on what functions they perform.  Allow me to illustrate with an analogy.  Imagine you are seated at a restaurant.  You want to order food, but you can’t just go to the kitchen and ask the chef for what you want.  You instead have to relay this information to your server, who then places your order with the chef and delivers your food when it’s ready.  This is the idea behind the client-server model.  You, the client, send a request that you would like to order something by sitting down in the restaurant.  The server, who is listening for new connections, sees your request and responds by coming over to your table.  You communicate the food you would like to receive using a protocol (the menu).  The server will recognize what type of service you are trying to use and pass the information to that appropriate application.  If you order a drink, he will place an order with the bar.  If you order food, he will place the order with kitchen.  Once the order you’ve requested has been prepared, the server will deliver your order to you.  He will also ask you how it tastes and whether you need anything else.

Websites, and many other network services, work in the same fashion.  In order to get a website, your computer, the client, sends a connection request to a web server.  A web server is simply another computer running a web service application.  When the server receives a request, it tells the client that it exists.  The client sends another request, this time for the specific webpage you are trying to view.  It does this using the Hypertext Transfer Protocol (HTTP)(more on this later).  When the server receives this request, it passes the request to the web service application, which prepares the information of the website to be sent to you.  Once it’s ready, the server delivers your requested webpage.  Your client will send an acknowledgement of receipt of the webpage.  For any parts of the page that weren’t received (Hey, waiter, you forgot my mashed potatoes!), the server will resend those pieces.  It’s important to really understand this concept first, as it will affect EVERYTHING I talk about further on down the road.  If you have trouble, read some of the links I’ve provided or post a comment below.