Web Dev Learning Guide for Melissa  


1) How does the internet work?

Answer these without looking: Read these:
  • What is HTTP?  show answer
    HTTP stands for "HyperText Transfer Protocol". It is a set of rules for transferring data between the client and the server. It is just one of several Transfer Protocols like FTP (File Transfer Protocol), TCP (Transmission Control Protocol), and SMTP (Simple Mail Transport Protocol). Most protocols have a version with an "S" (HTTPS, SFTP) which stands for "secure" which means that the transfer is encrypted before it's sent.
  • What is an HTTP request and how does it work?  show answer
    An HTTP request is any web request made using HTTP (or HTTPS).

    Whenever you click on a link, or do a Google search, or do pretty much anything on the internet, you're probably making an HTTP request. An HTTP request is typically made by a client to a server. Servers can also make HTTP requests to other servers but it is not possible to make an HTTP request to a client.

    An HTTP request consists of a request header and request body. The header contains meta information about the request, like what type of request it is (request method), where it came from, who is allowed to see it, and a status code indicating what the result was (did it succeed, fail, etc).
    The request body contains the substantive information in the request; basically the data being transferred like some parameters detailing what you need from a server, or the complete HTML data containing the webpage you're attempting to view.

    HTTP requests come in one of several request methods. The four most common ones are GET, POST, PUT, and DELETE. Of these GET and POST make up the vast majority of the requests made across the web.
  • What is a Client?  show answer
    A client is anything making a request to a server. In most cases, the client is a browser like Chrome, Firefox, or Safari. But clients can also be other programs on your laptop (like Mail or Excel), hardware devices (like printers, Amazon Alexa, or the navigation system in a car), or even other servers (using a library like cURL). If it makes a request to a server, we call it a "client".

    The client is associated with the "front-end". If you are a "front-end developer" you work exclusively on developing software in the client or on the "client-side". Javascript is the only game in town when it comes to client-side programming languages.
  • What is a Server?  show answer
    A server is any software that receives and processes network protocol request (like HTTP, TCP, FTP etc.). Servers are simply physical or virtual computers on which specialize software has been installed to receive network protocol requests from clients and return a response.

    Servers are associated with the "back-end". If you are a "back-end developer" you work exclusively on developing software that runs on the server or "server-side". Since the server is just a specialized computer, any programming language can be run server-side. Some examples of server-side languages and frameworks are PHP, Java, C#, Python (using Django framework), Ruby (using Rails framework), and Javascript (using the NodeJS runtime and Express framework).
  • What is DNS and how does it work?  show answer
    DNS stands for Domain Nname Server. This is a specialize type of server that processes requests for a domain (like www.melissadiaz.com). When you register a domain, that registration information is stored on a DNS server. The DNS server's main job is to maintain a huge database of domain names and their associated IP address. When you put www.melissadiaz.com in the browser and press Enter, the request goes to a DNS server to get the IP address for that website.
  • What are the different parts of a URL?  show answer
    URL stand for Uniform Resource Locator - it is the "address" you put in the browser address bar to request a webpage or resource.

    URLs are composed of a Protocol, subdomain, domain or "root domain", domain extension, path, and query string.

    For the URL https://www.melissadiaz.com/shows/march?date=12&love=you, the https is the protocol, the www is the subdomiain, the melissadiaz is the domain, the .com is the domain extension, the /shows/march is the path, and everything after the ? is the query string.

    The query string can be further broken down into individual parameters, in this case date=12 and love=you. The query string is typically used to pass extra information along with the URL and is associated the the HTTP GET request method.
  • What is an IP address?  show answer
    The IP (Internet Protocol) address is set of numbers like that is assigned to every device connected to the internet. It acts as a unique identifier for that device or resource the way a physical address like "345 Bragg st. Brooklyn, NY" uniquely defines a location in the physical world. All websites you visit are accessed using an IP address. The domain name is really just a proxy used for aesthetic purposes and the DNS (domain name server) keeps track of what the IP address is for every domain name.

    The most common type of IP address is IPv4, which stands for "IP version 4". IPv4 are the typical IP addresses like or 123.653.12.0 and consist of four groups of up to three numbers. If you do the math, you will find that there are 4,294,967,296 IPv4 addresses possible. That seems like alot, but given that every device on the internet needs a new and unique IP address, this number is not sufficient. Therefore, IPv6 was created (they skipped IPv5), which consists of 128bit hexidecimal system which looks like 2001:0db8:0000:0042:0000:8a2e:0370:7334. There are 10^28 number of IPv6 addresses possible so we're not going to run out for a long time.
  • Explain what happens when you make a request to a web server.  show answer
    When you visit a website (i.e. request a webpage using a URL) you make a request from your client (the browser) to a web server (some other physical or virtual computer somewhere out there in the world).

    The request starts with the URL (like https://www.melissadiaz.com/about). When you put the URL in the address bar and press Enter, the browser parses the URL to figure out what kind of request you're trying to make (the protocol), what domain name you are making it to (the subdomain, root domain, and path), and whether there are any parameters you will be sending along with your request (the query parameters). The browser then uses this information to compile a request in the correct format, including the appropriate request headers and request body. The browser then needs to figure out the IP address of the domain name you provided. The ultimate record of truth for every domain name's IP address is the Domain Name Server (DNS), but since making a request to the DNS for every requests made on the internet every time would be inefficient, the browser can usually find the IP address stored in one of several cached data sources. Once the browser has the IP address, it encodes the request using the provided protocol and sends it over the internet.

    The request will ideally be received by a web server (although you can make a request to some IP address with no configured server on the other end, in which case, it'll just time-out). Once the web server receives the request, it will hopefully be running some software (like PHP or NodeJS) that is able to interpret the request and return some coherent response. The server will also read the headers of the request to make sure it is allowed to accept a request from that source. If the source of the request is not allowed, it will return the appropriate response code. Otherwise, in the case of a request for a webpage, the server will parse the request using the path and query parameters and run whatever code (written by some back-end developer) applies for this particular request. If the code results in some output being printed, that raw text data will be appended to the response body. Finally, the response will be, once again, encoded using the appropriate protocol and returned to the request origin (your browser - via it's IP address). The response will have it's own headers, response body, and the applicable response code (200 for a successful request).
Types of Network Protocols HTTP Request Methods Everything about HTTP requests Really cool comic strip explaining how DNS works Anatomy of a URL We're running out of IPv4 addresses What happen to IPv5? What happens when you make a web request HTTP response codes

2) Web Dev basics

Answer these without looking: Read these:
  • What is a "stack" and what are some common stacks?  show answer
    A "stack" is a combination of solutions/technologies that, when combined, allow the building of a complete web application.

    A stack typically consists of a back-end solution (web server), back-end programming language (PHP, Node, Python), data persistence solution (basically a database), and an operating system (Windows, Mac OS, Linux etc.). The most common type of stack is LAMP (Linux Apache MySQL Php), MEAN (Mongo DB Express.js Angular.js Node.js) - in the case of the MEAN stack, a web server and operating system are not included in the acronym and a front-end technology (Angular.js) is included- this is kind of a break from convention. For the MEAN stack, the web server type is often NGINX (pronounced "Engine X") and the operating system is most likely Linux. Other stacks like MAMP (M = Mac OS) & WAMP (W = Windows) are typically just used for local development (building a website on your computer).
  • What are the different types of web servers and what programming languages can be run on each?  show answer
    Web servers are basically just computers (physical or virtual) on which specialize software has been installed to receive and response to web requests. The type of software installed (not the hardware) is what determines the web server type. All web server types can theoretically run any back-end programming language but most have been specialized to run a particular back-end language.

    The most common type of web server is Apache which typically runs PHP. Nginx (pronounced "Engine X") is another popular type of web server and that typically runs NodeJS but can also run Python, Ruby, and PHP. Apache and Nginx are the two most common open-source (non-propriotary) web servers. Other web servers are Java Web server (runs the Java programming language) and Windows Server (runs the .NET Framework, which is built using the C# programming language).
Older article about some development stacks