<?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: Abhinav Patel</title>
    <description>The latest articles on DEV Community by Abhinav Patel (@knackofabhinav).</description>
    <link>https://dev.to/knackofabhinav</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F608353%2Ff6fadb26-aa63-4683-9f2c-974a5b65fe4e.png</url>
      <title>DEV Community: Abhinav Patel</title>
      <link>https://dev.to/knackofabhinav</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/knackofabhinav"/>
    <language>en</language>
    <item>
      <title>What are Protocols? IP/DNS/TCP or Ports? What does port 80 even mean?</title>
      <dc:creator>Abhinav Patel</dc:creator>
      <pubDate>Thu, 22 Apr 2021 04:13:49 +0000</pubDate>
      <link>https://dev.to/knackofabhinav/what-are-protocols-ip-dns-tcp-or-ports-what-does-port-80-even-mean-1g19</link>
      <guid>https://dev.to/knackofabhinav/what-are-protocols-ip-dns-tcp-or-ports-what-does-port-80-even-mean-1g19</guid>
      <description>&lt;p&gt;Hey beautiful people! Are you feeling lost in the ocean of complex words when you search "What are protocols? what the heck is a port? What's port 80?"&lt;/p&gt;

&lt;p&gt;Don't stress out in this blog we are gonna talk about all of it once and for all in simpler words about how does the internet really works. So grab some water and enjoy the ride!&lt;/p&gt;

&lt;p&gt;Let's start off with Protocols.&lt;/p&gt;

&lt;p&gt;Protocols mean a set of conventions or standards which are decided by a group of people that two individuals follow to communicate effectively. &lt;/p&gt;

&lt;p&gt;For example, in the pre-covid world, if one person puts forward his hand, the other person pulls out his hand for a handshake. It's a protocol humans use to greet each other whereas now we all follow covid "protocols" as you may hear off.&lt;/p&gt;

&lt;p&gt;In the same way, there are few protocols which all the computers over the internet follow to understand each other. Some of the most popular protocols you might have heard or seen are IP or TCP.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is IP?
&lt;/h1&gt;

&lt;p&gt;IP means Internet Protocol. It's the address of each computer over the internet. Didn't make sense, huh? &lt;/p&gt;

&lt;p&gt;Let's take an example of a letter and its envelope. When we write a letter and put it in an envelope, on the envelope we write the addresses of receiver and sender to return if it's undelivered for any reason whatsoever. &lt;/p&gt;

&lt;p&gt;Now you might be thinking WTH Abhinav? We were talking about IP where does this come in between. Wait for some time it all will make sense trust me😇 just read through. &lt;/p&gt;

&lt;p&gt;So in this metaphor, the letter was data, the addresses were IP Addresses of the server and client.&lt;/p&gt;

&lt;p&gt;When we send some data from Point A to Point B on the internet we need the IP Addresses of both the points to send our data. Now you might say but Abhinav we never type in blah.blah.somenumber.othernumber in the search bar. &lt;/p&gt;

&lt;p&gt;You are right. &lt;/p&gt;

&lt;p&gt;Humans don't remember some gibberish numbers as an address for a  website. We remember domain names tho. which redirects us to those IPs. &lt;/p&gt;

&lt;h1&gt;
  
  
  DNS
&lt;/h1&gt;

&lt;p&gt;It's called DNS or Domain Name System it's like the directory of all the IPs. So when you type in microsoft.com you are actually looking for this URL in the DNS through your Internet Service Provider and then redirecting to the IP which your ISP gives in return.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1kly61pywcrxal0yfq86.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1kly61pywcrxal0yfq86.png" alt="04webpage_new"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So as IP and DNS are clear.&lt;br&gt;
Now comes the meat of the blog! What's TCP? &lt;/p&gt;

&lt;h1&gt;
  
  
  TCP
&lt;/h1&gt;

&lt;p&gt;TCP or Transmission Control Protocol is a solution to a couple of problems, but let me ask you a question first won't it be pretty convenient for the individual servers to be able to do multiple things, right?&lt;/p&gt;

&lt;p&gt;The servers can host emails, websites, chat services, video conferencing, and many more growing list of features in the new software we use nowadays. &lt;/p&gt;

&lt;p&gt;Won't it be great if one server can do all of it on its own? It would save our resources financially as a business and easy to manage.&lt;/p&gt;

&lt;h1&gt;
  
  
  Port Number
&lt;/h1&gt;

&lt;p&gt;So for that let's go to our previous letter example, imagine if postman writes a number on that envelope to filter out which letter needs to be going to which area of the town so they can distribute those letters effectively in less time same way think of that number as the port number in the world of internet. &lt;/p&gt;

&lt;p&gt;Port Numbers are standard numbers that signify which service you want to use in the server so it's easy for the server to understand the type of request.&lt;/p&gt;

&lt;p&gt;For example, in the world of TCP, Port 80 is standard to send and receive requested Web pages from an HTTP server. It manages&lt;br&gt;
all HTTP-based requests that originate from a computer, regardless of the number of requests and initiating Web clients. or Port 443 from HTTPS which means it is a secure request for a webpage.&lt;/p&gt;

&lt;p&gt;Now it also takes care of the delivery of the data for example if some data gets lost in the process of transfer or maybe the server is overwhelmed by the requests as it has a finite memory it might lose some data sometimes. &lt;/p&gt;

&lt;p&gt;TCP also handles the process of retransmitting data as needed. if any of these packets of information gets lost in the space of the internet literally TCP will also compel your PC, Laptop, or phone to resend that data as well.&lt;/p&gt;

&lt;p&gt;Thank You!🥰 For reading it all through. I hope that gave you some clarity with regards to these terms instead of getting into the rabbit hole of the gibberish complex terms. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>WTH is SSR or CSR? When to use What?</title>
      <dc:creator>Abhinav Patel</dc:creator>
      <pubDate>Sun, 04 Apr 2021 10:32:07 +0000</pubDate>
      <link>https://dev.to/knackofabhinav/wth-is-ssr-or-csr-when-to-use-what-4lf8</link>
      <guid>https://dev.to/knackofabhinav/wth-is-ssr-or-csr-when-to-use-what-4lf8</guid>
      <description>&lt;p&gt;Did you ever wonder what's rendering? or Server or Client Side Rendering?&lt;/p&gt;

&lt;p&gt;In this blog, we are gonna discuss how these things work in very simple terms.&lt;/p&gt;

&lt;p&gt;Let's start off with rendering 🙈&lt;/p&gt;

&lt;p&gt;Rendering is simply a process of combining data from a database with a template and giving out an HTML file as an output which the browser can use.&lt;/p&gt;

&lt;p&gt;Data from Database + Templating = HTML (This whole process is called rendering)&lt;/p&gt;

&lt;p&gt;The user asks for only an HTML file it doesn't care from where is it coming. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Templating can be done by the server or by the client (browser)&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When the Server does Rendering its Server Side Rendering and will need &lt;strong&gt;Server Side Routing&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the Client does Rendering its Client Side Rendering and will &lt;br&gt;
need &lt;strong&gt;Client-Side Routing&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Server-Side Rendering:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We get the data + view both from the server.&lt;/li&gt;
&lt;li&gt;Bad UX as need to get the whole page again for eg. Navbar and footer which more or less remains the same.&lt;/li&gt;
&lt;li&gt;Difference between Server-Side Generation and Server Side Rendering -&lt;/li&gt;
&lt;li&gt;SSG is when the server does all the work beforehand and is ready with all the HTML files to be served whereas in SSR it waits when the file is requested, then when it's requested it takes data from DB and merge with template and then creates a file on the fly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Client Side Rendering:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only talks to the server for the data not for the view after the first render.&lt;/li&gt;
&lt;li&gt;Creates Single Page Application&lt;/li&gt;
&lt;li&gt;That's the reason why mobile or desktop apps are soo large because they already have the view and only talk to the server for the data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Client-Side Routing:&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SPA Routing experience. (Forward → and ← in page works)&lt;/li&gt;
&lt;li&gt;URL update as well so easy to share your link to the exact page with someone.&lt;/li&gt;
&lt;li&gt;But Bad for SEO - use SSR for text-heavy things.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;As a Bonus for reading this much 😌:-&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lets understand the most confusing thing in React Routes which is when to use which URL Param so here are all the Types of URL Parameters and when to use them:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;pathname

&lt;ul&gt;
&lt;li&gt;when you want static resources.&lt;/li&gt;
&lt;li&gt;you wanna render the whole new Component page.&lt;/li&gt;
&lt;li&gt;eq. Category Page as its a whole new component&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;search

&lt;ul&gt;
&lt;li&gt;when you need data from a server doing SSR&lt;/li&gt;
&lt;li&gt;don't use it for routing.&lt;/li&gt;
&lt;li&gt;only for in-page changes.&lt;/li&gt;
&lt;li&gt;query parameters, easy to share with anyone.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;hash

&lt;ul&gt;
&lt;li&gt;similar to search but only used for CSR&lt;/li&gt;
&lt;li&gt;used inside CSR Navigation when the page is big.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;state

&lt;ul&gt;
&lt;li&gt;when you want to provide data through route without showing the data in URL.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What is pre-rendering?
&lt;/h3&gt;

&lt;p&gt;Pre-rendering is a tradeoff between client-side and server-side rendering. Every pre-rendered page displays a skeleton template while the data waits to be rehydrated with AJAX/XHR requests. Once the page is fetched, internal routing is done dynamically to take advantage of a client-side rendered website.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a universal app?
&lt;/h3&gt;

&lt;p&gt;A universal app sends to the browser a page populated with data. Then the app loads its JavaScript and rehydrates the page to get a fully client-side rendered app. This approach combines the advantages of the latest techniques available today.&lt;/p&gt;

</description>
      <category>react</category>
      <category>rendering</category>
      <category>routing</category>
      <category>server</category>
    </item>
  </channel>
</rss>
