<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jacopo Carosi (TheEdgeOfDev)</title>
    <description>The latest articles on DEV Community by Jacopo Carosi (TheEdgeOfDev) (@j_c_theedgeofdev).</description>
    <link>https://dev.to/j_c_theedgeofdev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3218393%2F32c2fe29-1bd8-4625-ab9b-d5d45b5a3ee4.png</url>
      <title>DEV Community: Jacopo Carosi (TheEdgeOfDev)</title>
      <link>https://dev.to/j_c_theedgeofdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/j_c_theedgeofdev"/>
    <language>en</language>
    <item>
      <title>Web Request Journey</title>
      <dc:creator>Jacopo Carosi (TheEdgeOfDev)</dc:creator>
      <pubDate>Mon, 23 Jun 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/j_c_theedgeofdev/web-request-journey-2fpg</link>
      <guid>https://dev.to/j_c_theedgeofdev/web-request-journey-2fpg</guid>
      <description>&lt;p&gt;Considering that Front-end developers constantly work with concepts like lazy loading and asynchronous requests, they rarely take the time to consider &lt;br&gt;
what is really happening behind the scenes of the Web. &lt;br&gt;&lt;br&gt;
So, I decided to summarize the journey that a data packet usually takes from a client to a server, step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This article is not meant to replace deep foundational knowledge like the &lt;strong&gt;OSI model&lt;/strong&gt; or &lt;strong&gt;TCP/IP model&lt;/strong&gt;, which are covered in specialized courses.&lt;br&gt;
Rather, the article aims to be a conceptual map to get a high-level understanding of the main actors involved when we send a request to a server and receive a response.&lt;/p&gt;

&lt;h3&gt;
  
  
  Starting from the Browser
&lt;/h3&gt;

&lt;p&gt;Everything begins on your computer or mobile device the moment you open your favorite browser (Firefox, Chrome, Safari).&lt;br&gt;&lt;br&gt;
You type a URL (e.g., &lt;code&gt;www.example.com&lt;/code&gt;) into the address bar or click on a link that opens a web page.&lt;/p&gt;

&lt;p&gt;Now the Browser performs several checks on various caches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Browser Cache Check&lt;/strong&gt;: first, it checks its &lt;strong&gt;local cache&lt;/strong&gt; to see if the page (or parts of it like images, CSS, JavaScript) was already downloaded and hasn't expired. If it finds a valid version it will use that, significantly speeding up load time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Browser DNS Cache&lt;/strong&gt;: checks if the IP address is in the browser's DNS cache.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operating System DNS Cache&lt;/strong&gt;: if not in the browser, it checks the OS DNS cache.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Local Router Cache&lt;/strong&gt;: may have its own DNS cache.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If none of the caches (or only part of them) can generate 100% of the page, it moves to the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DNS Resolution (Domain Name System)&lt;/strong&gt;: if the page isn't cached or the IP is unknown, the browser must translate the domain name (e.g., &lt;code&gt;www.example.com&lt;/code&gt;) into a numeric IP address (e.g., &lt;code&gt;93.184.216.34&lt;/code&gt;). It does so by querying the Internet Service Provider's DNS servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Authoritative/Root DNS Servers&lt;/strong&gt;: if the ISP doesn't know the domain, it queries higher-level DNS servers until it finds the &lt;strong&gt;authoritative server&lt;/strong&gt; for that domain, which returns the correct IP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Establishing TCP/IP Connection&lt;/strong&gt;: once the IP is obtained, the Browser establishes a connection with the server. Most web traffic uses the &lt;strong&gt;TCP (Transmission Control Protocol)&lt;/strong&gt;. This happens via a process called the &lt;strong&gt;"Three-Way Handshake"&lt;/strong&gt;:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SYN&lt;/strong&gt;: browser sends a SYN (synchronize) packet to initiate a connection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SYN-ACK&lt;/strong&gt;: server responds with a SYN-ACK (synchronize-acknowledge) packet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ACK&lt;/strong&gt;: browser responds with an ACK (acknowledge) packet. Now the connection is established! 🤝&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TLS/SSL Handshake (for HTTPS)&lt;/strong&gt;: if the URL starts with &lt;code&gt;https://&lt;/code&gt;, a secure connection is required. After the TCP handshake, a &lt;strong&gt;TLS/SSL Handshake&lt;/strong&gt; occurs to encrypt the exchanged data. Browser and server exchange messages to verify the server's identity via SSL/TLS certificate, agree on encryption algorithms, and generate secret session keys.&lt;br&gt;&lt;br&gt;
This ensures the data is unreadable to anyone intercepting it (in theory).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sending the HTTP Request&lt;/strong&gt;: now the Browser sends the actual &lt;strong&gt;HTTP request&lt;/strong&gt;, which includes:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Method&lt;/strong&gt;: &lt;code&gt;GET&lt;/code&gt;, &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;PUT&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path&lt;/strong&gt;: specific resource being requested (e.g., &lt;code&gt;/page.html&lt;/code&gt;, &lt;code&gt;/api/users&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Protocol Version&lt;/strong&gt;: (e.g., &lt;code&gt;HTTP/1.1&lt;/code&gt;, &lt;code&gt;HTTP/2&lt;/code&gt;, &lt;code&gt;HTTP/3&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Headers&lt;/strong&gt;: extra info like browser type (User-Agent), accepted content types (Accept), cookies, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Body&lt;/strong&gt;: optional, mainly for &lt;code&gt;POST&lt;/code&gt; or &lt;code&gt;PUT&lt;/code&gt; to send data (e.g., form input).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://theedgeofdev.link/posts/4_Web_Request_Journey/" rel="noopener noreferrer"&gt;Go to full article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>networking</category>
      <category>learning</category>
    </item>
    <item>
      <title>Vintage Lazy loading</title>
      <dc:creator>Jacopo Carosi (TheEdgeOfDev)</dc:creator>
      <pubDate>Mon, 12 May 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/j_c_theedgeofdev/vintage-lazy-loading-do3</link>
      <guid>https://dev.to/j_c_theedgeofdev/vintage-lazy-loading-do3</guid>
      <description>&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In this tutorial, I will show how I implemented an handmade lazy loading for a project where I was not able to use the modern solutions that we know well. Be aware: &lt;strong&gt;this is not a best practice or a solution as we usually intend&lt;/strong&gt;, but a workaround that I found in one of my jobs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://theedgeofdev.link/posts/3_Vintage_Lazy_loading/" rel="noopener noreferrer"&gt;Go to full article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>learning</category>
      <category>coding</category>
    </item>
    <item>
      <title>JavaScript Traps</title>
      <dc:creator>Jacopo Carosi (TheEdgeOfDev)</dc:creator>
      <pubDate>Wed, 16 Apr 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/j_c_theedgeofdev/javascript-traps-56em</link>
      <guid>https://dev.to/j_c_theedgeofdev/javascript-traps-56em</guid>
      <description>&lt;h2&gt;
  
  
  Why is JavaScript Full of Pitfalls?
&lt;/h2&gt;

&lt;p&gt;I’ve never loved LeetCode and coding quizzes; I always saw them as a specialization in our field, in light of the fact that it is a mix of mindset and training. And in fact, not all developers are good at programming quizzes, &lt;strong&gt;me included&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But recently, speaking with a friend about these kinds of tests, I found myself having to explain why JavaScript, unlike other languages, requires a more cautious and informed approach right from the basics when you want to test yourself and OMG…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://theedgeofdev.link/posts/2_JavaScript_Traps/" rel="noopener noreferrer"&gt;Go to full article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Clean CSS Architecture</title>
      <dc:creator>Jacopo Carosi (TheEdgeOfDev)</dc:creator>
      <pubDate>Fri, 28 Mar 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/j_c_theedgeofdev/clean-css-architecture-4mjm</link>
      <guid>https://dev.to/j_c_theedgeofdev/clean-css-architecture-4mjm</guid>
      <description>&lt;p&gt;CSS defines how things should appear on the screen, not how to calculate or execute them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In this article, I intend to explore in depth a question that many Front-end developers know well: &lt;strong&gt;why CSS is so often a source of frustration and skepticism&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I won’t just retrace its historical problems, but I want to delve into what I consider the fundamental misunderstanding of CSS: the idea that key concepts like the cascade algorithm and specificity are design flaws to be circumvented, perhaps by resorting to frameworks, rather than true foundational features of the language.&lt;/p&gt;

&lt;p&gt;To learn to appreciate CSS, I believe it’s essential first and foremost to accept the mechanisms that govern it, from the box model to display, passing through the cascade, and to learn to use them consciously. Only then we can apply the indispensable order and discipline to the structure of our code, aiming to create stylesheets that are not only functional, but above all scalable and with predictable behavior.&lt;/p&gt;

&lt;p&gt;Precisely with this goal in mind, towards the conclusion of the article I will present my solution: the Clean CSS Architecture. Inspired by the basic principles of Design Systems and some concepts from Clean Architecture, this proposal of mine offers a structured approach that allows using the intrinsic principles of the cascade in a controlled and predictable way, thus transforming what many see as a weakness into a strength for code maintainability.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://theedgeofdev.link/posts/1_Clean_CSS_Architecture/" rel="noopener noreferrer"&gt;Go to full article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>css</category>
      <category>architecture</category>
      <category>design</category>
    </item>
  </channel>
</rss>
