<?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: Khan Anupam Shafi</title>
    <description>The latest articles on DEV Community by Khan Anupam Shafi (@khananupamshafi).</description>
    <link>https://dev.to/khananupamshafi</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%2F781925%2F138058d4-3346-4c37-8717-bb326baf2b1d.png</url>
      <title>DEV Community: Khan Anupam Shafi</title>
      <link>https://dev.to/khananupamshafi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khananupamshafi"/>
    <language>en</language>
    <item>
      <title>Understanding REST &amp; CRUD Operations</title>
      <dc:creator>Khan Anupam Shafi</dc:creator>
      <pubDate>Tue, 28 Dec 2021 11:29:18 +0000</pubDate>
      <link>https://dev.to/khananupamshafi/understanding-rest-crud-operations-3j0n</link>
      <guid>https://dev.to/khananupamshafi/understanding-rest-crud-operations-3j0n</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is CRUD?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CRUD stands for create, read, update, and delete in computer programming which represents the four basic operations you can do on any data. We simply create something new, can read or view the newly created data, even edit or update the data and finally the option to delete the data using CRUD operation. We can find CRUD on almost any application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CRUD vs. REST: What’s the Difference?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CRUD and REST can sometime be confusing to new developers. &lt;br&gt;
Different programming languages and protocols may use different name for CRUD operations but the idea is the same. For example SQl language calls the four functions Insert, Select, Update, and Delete&lt;br&gt;
On the other hand REST  is a popular architectural style for web API design used by many developers.&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%2Fqogb08xjoyxngjsrpqro.JPG" 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%2Fqogb08xjoyxngjsrpqro.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The confusion between CRUD and REST architecture arises  from the fact that interacting with REST applications usually involves the use of CRUD-like functions. As we know in REST applications client and server interact in a uniform / predictable way.&lt;br&gt;
Rest APIs communicate with clients using the HTTP protocol, which uses its own set of methods for data manipulation. These are known as http verbs : GET, POST, DELETE, PUT, and PATCH, are some known HTTP verbs . And this  can overlap with CRUD functions like following:&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%2Fvc3cuiqdye4gz5cb6sqx.JPG" 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%2Fvc3cuiqdye4gz5cb6sqx.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though they look the same they don't map exactly to one another like PUT and POST may both correspond to CREATE in CRUD operation. But both Put and Post have their own use cases.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;. PUT can only replace data even if that data doesn’t exist in the system. However POST usually adds a new resource. They can both be used to Create new resources, but PUT is mainly used to Update existing resources.&lt;/li&gt;
&lt;li&gt;. PATCH is used to Update part of a data, whereas PUT is only used to Update a resource by replacing the whole data.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
