<?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: Cyril CHAPON</title>
    <description>The latest articles on DEV Community by Cyril CHAPON (@cyrilchapon).</description>
    <link>https://dev.to/cyrilchapon</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%2F521268%2F1533f957-3d93-4e5f-8c1a-8473cbf77386.png</url>
      <title>DEV Community: Cyril CHAPON</title>
      <link>https://dev.to/cyrilchapon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cyrilchapon"/>
    <language>en</language>
    <item>
      <title>What is a "website", after all?</title>
      <dc:creator>Cyril CHAPON</dc:creator>
      <pubDate>Tue, 08 Dec 2020 11:50:35 +0000</pubDate>
      <link>https://dev.to/cyrilchapon/so-what-is-a-website-after-all-1l59</link>
      <guid>https://dev.to/cyrilchapon/so-what-is-a-website-after-all-1l59</guid>
      <description>&lt;p&gt;When landing as a &lt;strong&gt;web developer&lt;/strong&gt; in 2020, it's god damn easy to get ahead of ourselves. Many tutorials or even new-wave schools go straight in-depth with &lt;em&gt;framework&lt;/em&gt; concepts or &lt;em&gt;language&lt;/em&gt; skills; but the very basic theory behind web technologies is often skipped or misunderstood.&lt;/p&gt;

&lt;p&gt;That theory though, appears to me as a fundamental skill. Not only to &lt;strong&gt;understand&lt;/strong&gt; what we're actually doing, but also to be able to &lt;strong&gt;deepen&lt;/strong&gt;, &lt;strong&gt;learn&lt;/strong&gt; way faster, and &lt;strong&gt;optimize&lt;/strong&gt; further the code we're typing everyday.&lt;/p&gt;

&lt;p&gt;In this unique point of view, we'll first unzoom to the concepts, then rezoom back with a better knowlegde. Let's get it started !&lt;/p&gt;

&lt;p&gt;Disclaimer: shortcuts and imprecisions are taken here, the aim is to popularize the concepts. Feel free to correct though 🙂&lt;/p&gt;




&lt;p&gt;The less opiniated &lt;em&gt;TL;DR;&lt;/em&gt; of a website I can think of is &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a &lt;strong&gt;collection of web pages&lt;/strong&gt;, reachable through a &lt;strong&gt;web browser&lt;/strong&gt;, most commonly exposed publicly on &lt;strong&gt;HTTP URLs&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We'll comeback to this later. For now it leads us to 3 more questions :&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a web page ?
&lt;/h2&gt;

&lt;p&gt;From the user perspective, a web-page is kind of a &lt;strong&gt;document&lt;/strong&gt; viewed in a web browser, presenting some kind of data.&lt;/p&gt;

&lt;p&gt;Technically, it starts with an &lt;em&gt;&lt;strong&gt;HTML&lt;/strong&gt; document&lt;/em&gt; containing rich &lt;strong&gt;data&lt;/strong&gt; — HTML is a declarative markup language.&lt;/p&gt;

&lt;p&gt;The document also declares some &lt;strong&gt;metadatas&lt;/strong&gt;, including technical "links" to 2 other kind of documents :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;CSS&lt;/strong&gt; declaring &lt;em&gt;styles&lt;/em&gt; to apply to the HTML markup&lt;/li&gt;
&lt;li&gt;and the &lt;strong&gt;Javascript&lt;/strong&gt; which is a scripting language that &lt;em&gt;manipulates&lt;/em&gt; the HTML markup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the browser perspective, roughly this whole thing is a web page (we'll come back to the browser in a second).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QvJ-Lszt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rhb4wqs1s2c8lph606z7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QvJ-Lszt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rhb4wqs1s2c8lph606z7.png" alt="Web page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is HTTP ?
&lt;/h2&gt;

&lt;p&gt;HTTP is a &lt;em&gt;transfer protocol&lt;/em&gt;. Simply put, it means a &lt;strong&gt;pipe&lt;/strong&gt; between &lt;strong&gt;two entities&lt;/strong&gt;. More precisely, it's a (textual) &lt;strong&gt;convention&lt;/strong&gt; (over some low-level protocols) that organise &lt;strong&gt;data exchange&lt;/strong&gt; between them.&lt;/p&gt;

&lt;p&gt;The protocol involves a &lt;strong&gt;request&lt;/strong&gt; and a &lt;strong&gt;response&lt;/strong&gt;, and in the case of websites; the entities we talk about are a &lt;strong&gt;client&lt;/strong&gt; and a &lt;strong&gt;server&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xD6zOuQU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/reev5x1daj9gu4kfczua.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xD6zOuQU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/reev5x1daj9gu4kfczua.png" alt="HTTP, client and server"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is what an &lt;strong&gt;HTTP request&lt;/strong&gt; looks like.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET / HTTP/1.1
Host: www.cyril-chpn.fr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the according &lt;strong&gt;HTTP response&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 200 OK
Content-Type: text/html

&amp;lt;html&amp;gt;Some HTML&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What is a web browser ?
&lt;/h2&gt;

&lt;p&gt;Well. That's a both simple and hardcore part 😅&lt;/p&gt;

&lt;p&gt;Conceptually — we'll stick to this for now, a web browser is just an executable software installed on a computer. It is capable of the 2 things required to &lt;strong&gt;browse&lt;/strong&gt; the web :&lt;/p&gt;

&lt;p&gt;Act as &lt;strong&gt;a client&lt;/strong&gt; for &lt;em&gt;HTTP&lt;/em&gt; protocol. It means communicating through HTTP with a server. It involves host resolution to IP, URL parsing, HTTP encoding / decoding, and much more stuff.&lt;/p&gt;

&lt;p&gt;Act as &lt;strong&gt;an interpreter&lt;/strong&gt; for &lt;em&gt;HTML + CSS + JS&lt;/em&gt;. It means being able to understand every bit of code on the three of those languages, and visually present web pages accordingly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8MgGaNcd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5njk5ebgsg78ceay2k0t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8MgGaNcd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5njk5ebgsg78ceay2k0t.png" alt="Browser request explained"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Let's summarize and wrap-up what we've seen here.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;webpage&lt;/strong&gt; is compound of HTML + CSS + JS code, respectively presenting the content, styled, with interactions.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;web browser&lt;/strong&gt; is a software able to interact with a server over HTTP, and visually interpret webpages.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;website&lt;/strong&gt; is a collection of webpages available through HTTP, for a browser to access them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fm0rLQ3W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m0hmxcgbhzkbmi2sikzz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fm0rLQ3W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m0hmxcgbhzkbmi2sikzz.png" alt="Website"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now if you want to see it in action, be sure to check &lt;a href="https://www.cyril-chpn.fr"&gt;my own website&lt;/a&gt; showing an example of this, as long as a presentation of me and what I do 😁&lt;/p&gt;




&lt;p&gt;Thanks for reading ❤️&lt;/p&gt;

&lt;p&gt;Photo credits&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://unsplash.com/@leecampbell"&gt;Lee Campbell&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
