<?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: Tonmoy Roy</title>
    <description>The latest articles on DEV Community by Tonmoy Roy (@tonmoyrx).</description>
    <link>https://dev.to/tonmoyrx</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%2F779067%2Ff619eb91-7914-4d25-ad5d-a7d3d2ede850.jpg</url>
      <title>DEV Community: Tonmoy Roy</title>
      <link>https://dev.to/tonmoyrx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tonmoyrx"/>
    <language>en</language>
    <item>
      <title>Let's learn about Next.js API routes shortly</title>
      <dc:creator>Tonmoy Roy</dc:creator>
      <pubDate>Fri, 25 Feb 2022 13:31:09 +0000</pubDate>
      <link>https://dev.to/tonmoyrx/lets-learn-about-nextjs-api-routes-shortly-370h</link>
      <guid>https://dev.to/tonmoyrx/lets-learn-about-nextjs-api-routes-shortly-370h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Need a backend / API for your project? No problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next.js is a wonderful production-ready framework built on the JavaScript library React. It's extremely flexible letting us build simple static sites, server-side rendered apps, or a mix of both. One of the cool features of Next.js is how it handles the routing system. &lt;br&gt;
Routes can simply be created by adding a file into the /pages folder that is created for you when you bootstrap an app with create-next-app. Inside of here there is another folder called api. When you create a file inside of  an api it will be accessible at the route /api/.... But you won't be served with a page this time. &lt;br&gt;
This is an API endpoint belonging to the server-side of your app and is intended to return data, not pages. Here we can write backend code using Node.js if we desire. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Why should we use the /api routes&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
A nice way of thinking about a Next.js API route is as a middle-man for your app. Time for an analogy! 😃&lt;br&gt;
Consider a person called John who wants to send a letter to his friend Jane. Once Jane receives the letter she will send a reply back to John. But how do the letters get from one place to another? The Postman/Postwoman of course!&lt;br&gt;
The Postman/Postwoman acts as the middleman. This person handles the logic of transporting the letters where they need to be and this is kind of what we do with Next.js API routes. Often we make a request to an API route with some data. This is like posting your mail into the letterbox.&lt;br&gt;
Then behind the scenes, the post will go through things like sorting and manipulation before being sent to the other end (like an external API). When the person receives and replies to the letter, eventually the original sender will open the reply (response).&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Short Note on CRUD Operations of MongoDB…</title>
      <dc:creator>Tonmoy Roy</dc:creator>
      <pubDate>Fri, 24 Dec 2021 17:15:45 +0000</pubDate>
      <link>https://dev.to/tonmoyrx/short-note-on-crud-operations-of-mongodb-3lj1</link>
      <guid>https://dev.to/tonmoyrx/short-note-on-crud-operations-of-mongodb-3lj1</guid>
      <description>&lt;h2&gt;
  
  
  MongoDB CRUD Operations
&lt;/h2&gt;

&lt;p&gt;CRUD operations create, read, update, and delete documents in MongoDB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Create Operations&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Create or insert operations add new documents to a collection in the database. If the collection does not currently exist in the database, then insert operations will create the collection.&lt;/p&gt;

&lt;p&gt;MongoDB provides the following methods to insert documents into a collection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;db.collection.insertOne() &lt;/li&gt;
&lt;li&gt;db.collection.insertMany() 
Here, insert operations target a single collection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Read Operations&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
Read operations retrieve documents from a collection in the database.&lt;/p&gt;

&lt;p&gt;MongoDB provides the following methods to read documents from a collection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;db.collection.find()
We can specify query filters or any criteria that identify the documents to return.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update Operations&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
Update operations modify existing documents in a collection of the database. &lt;/p&gt;

&lt;p&gt;MongoDB provides the following methods to update documents of a collection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;db.collection.updateOne() &lt;/li&gt;
&lt;li&gt;db.collection.updateMany() &lt;/li&gt;
&lt;li&gt;db.collection.replaceOne()
Here, update operations target a single collection.
We can also specify any criteria, or filters, that identify the documents to update.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Delete Operations&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
Delete operations remove documents from a collection in the database. &lt;/p&gt;

&lt;p&gt;MongoDB provides the following methods to delete documents of a collection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;db.collection.deleteOne() &lt;/li&gt;
&lt;li&gt;db.collection.deleteMany() 
Here, delete operations target a single collection.
We can specify any criteria, or filters, that identify the documents to remove.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>mongodb</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Short Note of React</title>
      <dc:creator>Tonmoy Roy</dc:creator>
      <pubDate>Wed, 22 Dec 2021 17:49:56 +0000</pubDate>
      <link>https://dev.to/tonmoyrx/short-note-of-react-12aj</link>
      <guid>https://dev.to/tonmoyrx/short-note-of-react-12aj</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;React Js&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
React is an open-source JavaScript library which is used for building user interfaces based on UI components specifically for single-page applications. &lt;/p&gt;

&lt;p&gt;Some advantages of React are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is easy to learn.&lt;/li&gt;
&lt;li&gt;A virtual DOM is used in React.&lt;/li&gt;
&lt;li&gt;There are reusable components.&lt;/li&gt;
&lt;li&gt;It operates on a one-way data flow.&lt;/li&gt;
&lt;li&gt;SEO friendliness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;JSX&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
JSX is a JavaScript Extension Syntax which is used in React to easily write HTML and JavaScript together. It allows us to write HTML elements in JavaScript and place them in the DOM without any createElement()  or appendChild() methods. &lt;br&gt;
JSX converts HTML tags into react elements. It is faster than regular JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Virtual DOM&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
Virtual DOM is a light-weight abstraction of the real DOM.  A virtual DOM object has the same properties as a real DOM. Manipulating the virtual DOM is much faster than the real DOM.&lt;br&gt;
In React, once the virtual DOM has been updated, it compares the current version of the virtual DOM with the previous version of the virtual DOM. This process is called “diffing” and the diff algorithm does that process in react. So, once React knows which virtual DOM objects have changed, then React updates only those objects, in the real DOM.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
