DAY 11: Web Basics

Hi there, future web developer! 🌐

Welcome back to another episode of Learning with Ify!! Today we will dive into the basics of the internet because understanding how it works is the first step to becoming a pro in web development.

How the Internet Works:

The internet is essential for website development. It is a global network of computing resources.

The Internet is a vast network of interconnected computers and servers that communicate with each other using standard protocols.

Understanding HTTP/HTTPS:

HTTP (HyperText Transfer Protocol) is the foundational protocol of data communication on the website to define how messages are formatted and transmitted between website servers and browsers.

PROCESS: When you type an address (e.g: google.com) into your browser, it sends an HTTP request to Google's server asking for the homepage. The server then sends the homepage back to the browser which then displays it on your screen.

The HTTP Request Methods:

    1. GET: This method requests data from a specified resource (e.g: Retrieving a webpage). This is the most common request method.

      1. POST: It sends data to a server to create or update a resource (e.g: Submitting a form).

      2. PUT: It updates an existing resource with new data.

      3. DELETE: This method removes a specified resource from the server.

HTTPS (HyperText Transfer Protocol Secure): This is just like HTTP but with an added layer of security, or better yet, encryption. Using SSL/TLS (Secure Sockets Layer/Transport Layer Security) ensures that the information remains private and integral. It ensures data security, especially for personal details, payment information, and login credentials.

Scenario: Imagine you're at a library (the internet) and you want a specific book (a website). You tell the librarian (your browser) what you’re looking for by typing in the book’s name (the URL). The librarian then sends a request to the storage room (the server) using a specific method called HTTP (HyperText Transfer Protocol). The storage room finds the book and sends it back to the librarian, who then hands it to you to read (displays it on your screen).

But what if you’re handling sensitive information, like your bank details? That’s where HTTPS (HyperText Transfer Protocol Secure) comes in - it’s like having a secure envelope that ensures only you and the librarian can see what’s inside. It uses SSL/TLS encryption to keep your data safe and private.

Understanding DNS:

DNS (Domain Name System): It acts like a phonebook for the internet. It translates human-friendly domain names (e.g., example.com) into IP addresses (e.g., 192.0.2.1), which computers use to identify each other on the network.

Scenario: Now, think of the internet as a giant city. Every website is a house, and each home has a unique address (an IP address). But who remembers those long, complicated addresses? Definitely not me! That’s where DNS (Domain Name System) comes in - it’s like a city’s phonebook, translating easy-to-remember names like 'example.com' into those numerical addresses that computers understand.

DNS Records are the instructions that tell the internet how to find your website. Think of them as directions in the phonebook.

Each type of record has a specific job. They are:

    • A (Address) Record: It maps a domain name ('example.com') to an IPV4 address (192.168 .1.1).

      In other words; it tells you where the house is located. To find the house; 'example.com', go to house number; '192.168 .1.1'.

      • AAAA (IPV6 address) Record: It is similar to the A Record but uses the newer, longer IPv6 addresses, because the internet keeps growing, and we need more houses (IP addresses)!

      • CNAME (Canonical Name) Record: It acts like a forwarding address for different names pointing to the same place.

        So, basically, it is like a nickname (it doesn't have its own address) but instead, redirects/refers to the real name. Instead of giving someone a new address, you say, “Oh, just look for 'blog.example.com' - it’s actually the same as 'example.com'.”

      • MX (Mail Exchange) Record: It directs emails to the correct mail server for your domain. When someone sends an email to '', the MX Record tells the email server (mailman) where to deliver it.

      • NS (Name Server) Record: It points to the authorities/official guide; the DOMAIN NAME SYSTEM which holds the information and knows all the IP addresses and which domain they hold.

        It is like asking a person of authority where to find all the houses in the city, so if you’re looking for a house, the NS Record says, 'Ask the DNS servers,they have the directions'.

      • TXT (Text) Record: These are like sticky notes with extra information, often for security.

        For example, you can say, “Only these servers can send emails from 'example.com',” which helps prevent spammers from pretending to be you.

Understanding The Difference Between Static And Dynamic Websites:

  • Static Websites: This is like a printed book, every time you open it, the content is exactly the same for everyone. It doesn’t change unless someone goes in and edits the pages by hand.

    It is simple, and straightforward, but not very flexible.

    How I remember it is, that each page on a static website is stored as a single HTML file, delivered directly from the server to the web page exactly as it is.

    The content essentially becomes part of the design on the page, so it will not change unless the original HTML file is edited at a code level.

  • Dynamic Websites: This is like having a conversation with a real person. The content can change based on what you say, ask, or do.

    That is what a dynamic website is like! It is connected to a database that can store and retrieve different pieces of information depending on what a user needs. This means everyone can have a personalized experience on the same website.

    E.g: Instagram shows you a personalized feed based on who you follow and what you like, and Amazon recommends products based on your past purchases - these are dynamic websites at work!

NOTES:

I know it is a bit bulky but trust me it is worth it.

I added different scenarios because it made it easier for me to understand and I am happy to share that with you all.

Happy reading everyone!!!