<?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: Swayam Samyak Debasis</title>
    <description>The latest articles on DEV Community by Swayam Samyak Debasis (@swayamsvk).</description>
    <link>https://dev.to/swayamsvk</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%2F354098%2F9e88ddd9-677b-4e54-8ed4-e0283cd35f6f.jpg</url>
      <title>DEV Community: Swayam Samyak Debasis</title>
      <link>https://dev.to/swayamsvk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swayamsvk"/>
    <language>en</language>
    <item>
      <title>More Stuffs About React Native</title>
      <dc:creator>Swayam Samyak Debasis</dc:creator>
      <pubDate>Mon, 10 Aug 2020 02:48:41 +0000</pubDate>
      <link>https://dev.to/swayamsvk/more-stuff-about-react-native-1eje</link>
      <guid>https://dev.to/swayamsvk/more-stuff-about-react-native-1eje</guid>
      <description>&lt;p&gt;This is an extension to my previous blog on Getting to know about React Native. In this article, I am going to discuss the advantages and disadvantages of react-native. This is going to be my experience in React Native and the information I gathered.&lt;/p&gt;

&lt;h1&gt;
  
  
  Advantages
&lt;/h1&gt;

&lt;p&gt;As I belong to Reactjs background I find it very easy to write a React Native code. The only difference I have seen as a beginner in react native is the HTML tags. As we are freely using HTML elements in Reactjs in jsx format. As far as I know, we are not allowed to do that in React Native. It imports different packages for different purposes. But as we are using basically the same language as we have been using in web development, it is quite advantageous. Other the rendering HTML elements everything else is the same starting from basic state management to using high-level state management techniques such as Redux.&lt;/p&gt;

&lt;h1&gt;
  
  
  Disadvantages
&lt;/h1&gt;

&lt;p&gt;According to the people who are already doing React Native it occasionally crashes during development for some unknown reason which makes it a little bit hard to debut. It has also some performance issues. The shortcomings that I faced during development in React Native is it usually requires different components for android and ios. And the design looks different so we generally have to change the code according to ios and android requirements. In short, the is relatively lots of extra stuff to do in React Native than any other framework.&lt;/p&gt;

&lt;h1&gt;
  
  
  For job purposes
&lt;/h1&gt;

&lt;p&gt;I would prefer learning to React Native if you are applying for jobs recently as React Native is being used in many companies and there is a high possibility of getting React Naive jobs then newly developed framework such as Flutter.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>android</category>
    </item>
    <item>
      <title>Getting to know about React Native</title>
      <dc:creator>Swayam Samyak Debasis</dc:creator>
      <pubDate>Tue, 21 Jul 2020 16:25:49 +0000</pubDate>
      <link>https://dev.to/swayamsvk/getting-to-know-about-react-native-1ldc</link>
      <guid>https://dev.to/swayamsvk/getting-to-know-about-react-native-1ldc</guid>
      <description>&lt;p&gt;These days I find android apps very fascinating and learning it is my next target. As a web developer, I thought picking up React Native would be a great idea as it is based on my favorite library React. In this blog, I will be providing my opinions on React Native.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;React Native is a framework that is built on React for the development of android and ios apps for native look and feel. It was released in 2015 and is being used by major companies since then. It can be used to build both ios and android apps. But it has its own shortcomings.&lt;/p&gt;

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

&lt;h1&gt;
  
  
  React Native vs Native Languages such as Java/Kotlin
&lt;/h1&gt;

&lt;p&gt;It is very obvious that Java/Kotlin being used for android development for a relatively long period of time than React Native. So it has great community support and it's quite easy to get into. And for React Native it's kind of a compulsion to know React or Javascript in general. But on the other hand React Native can develop apps on both the platforms android and ios.&lt;/p&gt;

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

&lt;h1&gt;
  
  
  React Native vs web view technologies such as Cordova
&lt;/h1&gt;

&lt;p&gt;Cordova is a technology used to convert basic web application into android and ios. But the disadvantage here is the app we develop in Cordova looks like a website Captured in a frame. And as React Native is also based on Javascript and also provides a native look It holds an advantage here.&lt;/p&gt;

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

&lt;h1&gt;
  
  
  React Native vs Flutter
&lt;/h1&gt;

&lt;p&gt;Flutter is similar to React Native but is released 2 years after it. It is quite new to the app development world but has gained its popularity soon after its introduction. It is written in dart which leads to the learning of a completely new language rather than using the existing languages. It's said that it is better than React Native because it overcomes various shortcomings that are being faced by React Native.&lt;/p&gt;

&lt;h1&gt;
  
  
  My opinions on React Native
&lt;/h1&gt;

&lt;p&gt;As a react developer I obviously like React Native as I can build android apps with my current skill set. But in the future, I would like to work on Flutter and also the native languages. I am happy that the development community is rising very fast to provide us the most interesting technologies around and I would like to explore more in the future.&lt;/p&gt;

&lt;h1&gt;
  
  
  For Beginners
&lt;/h1&gt;

&lt;p&gt;I would suggest if you are comfortable with React or Javascript in general then go for React Native otherwise learn any native language such as Kotlin or Swift. And another option is Flutter which is in my opinion by far the best option to learn a new language and build really good native apps.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>reactnative</category>
      <category>android</category>
      <category>ios</category>
    </item>
    <item>
      <title>Introduction to Deno</title>
      <dc:creator>Swayam Samyak Debasis</dc:creator>
      <pubDate>Mon, 22 Jun 2020 15:19:18 +0000</pubDate>
      <link>https://dev.to/swayamsvk/introduction-to-deno-4544</link>
      <guid>https://dev.to/swayamsvk/introduction-to-deno-4544</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Deno is an opensource runtime for Javascript which supports typescript out of the box.It uses V8 engine. According to Ryan Dahl, he made many mistakes in node he rectified in Deno. One of them is the use of npm to manage packages. Instead of doing that Deno can directly download the packages after importing it in the code via a link. So, there is no need for package.json but it was cool how it organized every asset of code and allows to change it manually.&lt;/p&gt;

&lt;h1&gt;
  
  
  Advantages of using Deno:-
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;It is more secure.&lt;/li&gt;
&lt;li&gt;Is typescript dependant&lt;/li&gt;
&lt;li&gt;Packages can be directly imported without the use of npm.&lt;/li&gt;
&lt;li&gt;It has a standard library.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;p&gt;There are various ways of installing Deno based on the operating system:-&lt;br&gt;
&lt;strong&gt;Linux Shell&lt;/strong&gt;:&lt;br&gt;
&lt;code&gt;curl -fsSL https://deno.land/x/install/install.sh | sh&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Windows&lt;/strong&gt;:&lt;br&gt;
For installation in windows installation through chocolatey is the better option but there are several other ways.&lt;br&gt;
&lt;code&gt;choco install deno&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Mac(Homebrew)&lt;/strong&gt;:&lt;br&gt;
&lt;code&gt;brew install deno&lt;/code&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Importing modules via Standard library
&lt;/h1&gt;

&lt;p&gt;Deno Provides the use of Standard Library rather than using npm to install modules as a result of this there is no need for the creation of the massive folder known as node_modules.&lt;br&gt;
&lt;code&gt;import { module } from "URL of the standard library";&lt;/code&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Use of TypeScript
&lt;/h1&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const greeting: string = "Hello World";
console.log(greeting);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In this case, if we do not mention the datatype it compiles and runs in a regular manner but if we mention a datatype Deno detects the use of typescript and compiles accordingly by taking the datatype into consideration. &lt;/p&gt;
&lt;h1&gt;
  
  
  Setting up a simple server
&lt;/h1&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { serve } from "https://deno.land/std/http/server.ts";
const server = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of server) {
  req.respond({ body: "Hello World\n" });
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This is a simple server setup built-in, Deno. Here we are first importing the serve module from the HTTP standard library and then setting up the req object and sending a response of "Hello world" to the body.&lt;/p&gt;
&lt;h1&gt;
  
  
  Running the Server
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;deno run --allow-net simpleServer.ts&lt;/code&gt;&lt;br&gt;
This is the command which is used to run our server which resides in the file simpleServer.ts.The "--allow-net" part is used because of security purposes.&lt;/p&gt;
&lt;h1&gt;
  
  
  Setting up Restful API using oak
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Server.ts
&lt;/h2&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Application } from 'https://deno.land/x/oak/mod.ts'
import router from './Routes.ts';

const port = 5000

const app = new Application()



app.use(router.routes())
app.use(router.allowedMethods())




console.log(`Server running on port ${port}`)

await app.listen({ port })
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This is the setup of the server which uses top-level await which does not require an async function. It runs on port 5000. It's importing the routes from Routes.ts file.&lt;/p&gt;
&lt;h2&gt;
  
  
  Routes.ts
&lt;/h2&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Router } from 'https://deno.land/x/oak/mod.ts'
import { getProducts,getProduct,addProduct,updateProduct,deleteProduct } from './controllers/products.ts' 


const router = new Router()


router.get('/api/v1/products',getProducts)
       .get('/api/v1/products/:id',getProduct)
       .post('/api/v1/products',addProduct)
       .put('/api/v1/products/:id',updateProduct)
       .delete('/api/v1/products/:id',deleteProduct)


export default router;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This specifies the routes of different operations in CRUD which are taking place in products.ts in controllers folder.&lt;/p&gt;
&lt;h2&gt;
  
  
  product.ts
&lt;/h2&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { v4 } from 'http://deno.land/std/uuid/mod.ts'
import { Product } from '../Types.ts';

let products: Product[] = [


{
    id:"1",
    name: "Product one",
    description:"This is product one",
    price: 29.99

},
{
    id:"2",
    name: "Product two",
    description:"This is product two",
    price: 39.99

},
{
    id:"3",
    name: "Product three",
    description:"This is product three",
    price: 59.99

}

]

// @desc Get all Products
// @route GET /api/v1/products

const getProducts = ({ response }: { response: any }) =&amp;gt; {
    response.body = {
    success: true,
    data: products
    }
}

// @desc Get single Product
// @route GET /api/v1/product/:id

const getProduct = ({ params,response }: { params: { id: string }, response: any }) =&amp;gt; {
   const product: Product| undefined = products.find(p =&amp;gt; p.id === params.id)

   if(product) {
    response.status = 200
    response.body = {
        success: true,
        data: product
    } 
    }else {
        response.status = 404
        response.body = {
        success: false,
        msg: 'No Product found'
        }

   }
}


// @desc Add Product
// @route POST /api/v1/products

const addProduct = async({ request,response }: { request:any , response: any }) =&amp;gt; {
const body = await request.body()

if(!request.hasBody){
response.status = 400
    response.body = {
    success:false,
    msg: 'No Data'
    } 
    }else {
        const product: Product = body.value
        product.id = v4.generate()
        products.push(product)
        response.status = 201
        response.body = {
            success: true,
            data:product
        }
}

}

// @desc Update Product
// @route PUT /api/v1/products

const updateProduct = async({ params,request,response }: { params: { id:string },request:any, response: any }) =&amp;gt; {
   const product: Product| undefined = products.find(p =&amp;gt; p.id === params.id)

   if(product) {
        const body = await request.body()

        const updateData: { name?:string;description?:string;price?:number } = body.value

        products = products.map(p =&amp;gt; p.id === params.id ? { ...p,...updateData }:p)

        response.status = 200
        response.body = {
            success: true,
            data: products
        }
    }else {
        response.status = 404
        response.body = {
        success: false,
        msg: 'No Product found'
        }
    }

   }


// @desc DELETE Product
// @route DELETE /api/v1/product/:id

const deleteProduct = ({ params,response }: { params:{ id:string }, response: any }) =&amp;gt; {
    products = products.filter(p =&amp;gt; p.id !== params.id)
    response.body = {
        success: true,
        msg: 'Product removed'
    }
}
export { getProducts,getProduct,addProduct,updateProduct,deleteProduct }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In this file, we use some temporary data to perform our CRUD operations. This file is responsible for the fetching of data, creating, deleting, and updating it. As these data are temporary(no data stored in a database) the effect disappears after closing the server.&lt;br&gt;
Types.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export interface Product {
    id:string;
    name:string;
    description:string;
    price:number;
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This is basically the interface where we specify the datatypes which are being used in product.ts file.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Deno is having a great future in the field of web development and can someday replace node. For the people who are starting node and having a thought that node is dead, in my opinion, that's not true as we can't replace the current technologies which are made in node to Deno. But the current features in Deno makes it a little more superior to node. But currently continuing with node is a better option as both are nearly the same.&lt;/p&gt;

&lt;p&gt;The Github link to this code is  &lt;a href="https://github.com/Swayamsvk/Deno_REST"&gt;https://github.com/Swayamsvk/Deno_REST&lt;/a&gt;&lt;br&gt;
This blog is inspired by &lt;a href="https://www.youtube.com/watch?v=NHHhiqwcfRM"&gt;This youtube video&lt;/a&gt;&lt;/p&gt;

</description>
      <category>deno</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>New Features on my current react project</title>
      <dc:creator>Swayam Samyak Debasis</dc:creator>
      <pubDate>Wed, 25 Mar 2020 13:31:36 +0000</pubDate>
      <link>https://dev.to/swayamsvk/new-features-on-my-current-react-project-19gm</link>
      <guid>https://dev.to/swayamsvk/new-features-on-my-current-react-project-19gm</guid>
      <description>&lt;p&gt;Actually, I have made a GitHub account finder using React and GitHub API. Now, I want to add features so that it becomes a complete MERN project. Any suggestions about the features.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>What are the recent javascript technologies that I should use in my project?</title>
      <dc:creator>Swayam Samyak Debasis</dc:creator>
      <pubDate>Tue, 24 Mar 2020 16:17:26 +0000</pubDate>
      <link>https://dev.to/swayamsvk/what-are-the-recent-javascript-technologies-that-i-should-use-in-my-project-421i</link>
      <guid>https://dev.to/swayamsvk/what-are-the-recent-javascript-technologies-that-i-should-use-in-my-project-421i</guid>
      <description>&lt;p&gt;Actually,I am going to work on a new project which is a chatroom using web sockets in node.What are the other recent technologies I should use in this project to keep myself updated with the recent technologies.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>javascript</category>
    </item>
    <item>
      <title>What are some of the good project ideas that use the concept of web sockets? 
</title>
      <dc:creator>Swayam Samyak Debasis</dc:creator>
      <pubDate>Mon, 23 Mar 2020 12:49:47 +0000</pubDate>
      <link>https://dev.to/swayamsvk/what-are-some-of-the-good-project-ideas-that-use-the-concept-of-web-sockets-n0f</link>
      <guid>https://dev.to/swayamsvk/what-are-some-of-the-good-project-ideas-that-use-the-concept-of-web-sockets-n0f</guid>
      <description>&lt;p&gt;Actually, we are a two-person team and want to build something interesting using web sockets with nodejs. Any suggestions are welcome.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
