<?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: Abzed Mohammed</title>
    <description>The latest articles on DEV Community by Abzed Mohammed (@abzed).</description>
    <link>https://dev.to/abzed</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%2F872743%2F874a0b31-545e-42f3-9ed1-500eacccffba.jpg</url>
      <title>DEV Community: Abzed Mohammed</title>
      <link>https://dev.to/abzed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abzed"/>
    <language>en</language>
    <item>
      <title>How to Deploy JSON-Server to Heroku (3 Easy Steps)</title>
      <dc:creator>Abzed Mohammed</dc:creator>
      <pubDate>Fri, 29 Jul 2022 22:42:28 +0000</pubDate>
      <link>https://dev.to/abzed/how-to-deploy-json-server-to-heroku-3-easy-steps-4p05</link>
      <guid>https://dev.to/abzed/how-to-deploy-json-server-to-heroku-3-easy-steps-4p05</guid>
      <description>&lt;p&gt;Creating a local database and running your API locally is as easy as having a &lt;em&gt;.json&lt;/em&gt; file and &lt;a href="https://www.npmjs.com/package/json-server" rel="noopener noreferrer"&gt;json-server&lt;/a&gt; installed in your machine or project. However, when deploying to Heroku that is another story.&lt;/p&gt;

&lt;p&gt;In this article I'll be deploying my local database to Heroku in &lt;strong&gt;three&lt;/strong&gt; easy steps. Before diving right to it, you should have &lt;a href="https://devcenter.heroku.com/articles/heroku-cli#install-the-heroku-cli" rel="noopener noreferrer"&gt;Heroku-CLI&lt;/a&gt; and &lt;strong&gt;npm&lt;/strong&gt; installed in your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step One - Configurations
&lt;/h2&gt;

&lt;p&gt;There are only two configurations needed. The first is to connect Heroku account to the Heroku-cli and the other part is creating the &lt;em&gt;package.json&lt;/em&gt; file.&lt;/p&gt;

&lt;p&gt;Open an empty folder with visual studio (VS Code), then open a VS Code terminal and use the command below to link your Heroku account to the Heroku-cli.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ heroku login&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will be prompted to open a link to your browser. Click on any key EXCEPT the letter &lt;em&gt;&lt;strong&gt;q&lt;/strong&gt;&lt;/em&gt; which will terminate the process.&lt;/p&gt;

&lt;p&gt;After you've chosen the Heroku account you want connected, the whole login process will automate and if you check your terminal again you should be logged in.&lt;/p&gt;

&lt;p&gt;The last step here is creating a &lt;em&gt;package.json&lt;/em&gt; file using the command below.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ npm init&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;There will be a series of prompts of version and descriptions of your project, click enter through each prompt and leave everything blank except for the last one which you will have to type &lt;em&gt;yes&lt;/em&gt; to finish the process.&lt;/p&gt;

&lt;p&gt;At the end of it all we should have a &lt;em&gt;package.json&lt;/em&gt; file. Within the file, the only dependency we need installed during the build process is &lt;strong&gt;&lt;em&gt;json-server&lt;/em&gt;&lt;/strong&gt;, which if you check the image below has been included in the dependencies section and finally the start command to run the server. See image below&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%2Fnr9ydfqpbm1othzw8i0y.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%2Fnr9ydfqpbm1othzw8i0y.png" alt="Image of package file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step Two - Creating Files
&lt;/h2&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%2F5bx9vf2r1itscoil0a0o.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%2F5bx9vf2r1itscoil0a0o.png" alt="Folder structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the image above, we only have 3 files inside our folder:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. db.json&lt;/strong&gt;&lt;br&gt;
This file will contain all the data we need to use as the API.&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%2F4kl7w6g0fv3yn2b4aj9c.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%2F4kl7w6g0fv3yn2b4aj9c.png" alt="Test data for deploying"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. server.js&lt;/strong&gt;&lt;br&gt;
All the configuration for &lt;em&gt;json-server&lt;/em&gt; to run on Heroku are stored in this file and also the path to the &lt;em&gt;db.json&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const jsonServer = require("json-server");&lt;br&gt;
const server = jsonServer.create();&lt;br&gt;
const router = jsonServer.router("db.json");&lt;br&gt;
const middlewares = jsonServer.defaults({ static: "./build" });&lt;br&gt;
const port = process.env.PORT || 3000;&lt;br&gt;
server.use(middlewares);&lt;br&gt;
server.use(router);&lt;br&gt;
server.listen(port);&lt;/code&gt;&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%2Fm2s0bmtuci9sm6bfo627.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%2Fm2s0bmtuci9sm6bfo627.png" alt="Server.js image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. package.json&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The package.json file contain the dependencies that will be required by Heroku during the build process to serve our data, as explained earlier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step Three- Deploying
&lt;/h2&gt;

&lt;p&gt;Once we have all the configuration and files ready, what's left is to deploy. In the &lt;a href="https://dashboard.heroku.com/apps" rel="noopener noreferrer"&gt;Heroku&lt;/a&gt; dashboard, at the top right corner, there is a button to create a new Heroku app. Click on it, give your application a unique name that you'll use as the API endpoint and create your app.&lt;/p&gt;

&lt;p&gt;Head back to Visual Studio and use the commands below to link the newly created Heroku app to the local project.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git init&lt;br&gt;
$ heroku git:remote -a your-app-name&lt;br&gt;
$ git add .&lt;br&gt;
$ git commit -am "make it better"&lt;br&gt;
$ git push heroku master&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After running the last command, your app should start building and deploying to heroku.&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%2Fpp41th6mbt6he2xt64xx.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%2Fpp41th6mbt6he2xt64xx.png" alt="building on heroku"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see your data, open the link and add a &lt;em&gt;/resources&lt;/em&gt; as the one declared in .json file, in my case I used friends i.e  &lt;em&gt;&lt;a href="https://your-app-name.herokuapp.com/friends" rel="noopener noreferrer"&gt;https://your-app-name.herokuapp.com/friends&lt;/a&gt;&lt;/em&gt;.&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%2Fkw8njyap44dk2yjtxohv.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%2Fkw8njyap44dk2yjtxohv.png" alt="Deployed site"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusions&lt;/strong&gt;&lt;br&gt;
This method is very easy to implement and takes less than 10-15mins. However, its not very secured. Be sure to use this method either for school projects or learning basis. As for creating secured API endpoints, I'd advise on using REST frameworks.&lt;/p&gt;

</description>
      <category>jsonserver</category>
      <category>heroku</category>
      <category>node</category>
    </item>
    <item>
      <title>Inverse Data Flow - The React Way</title>
      <dc:creator>Abzed Mohammed</dc:creator>
      <pubDate>Wed, 15 Jun 2022 13:21:00 +0000</pubDate>
      <link>https://dev.to/abzed/inverse-data-flow-the-react-way-5623</link>
      <guid>https://dev.to/abzed/inverse-data-flow-the-react-way-5623</guid>
      <description>&lt;p&gt;Are you stuck in React trying to get data i.e props/properties from a child component to a parent component? Or trying to share data between sibling components? Worry not, because this is where React &lt;strong&gt;Inverse Data Flow&lt;/strong&gt; comes in. &lt;/p&gt;

&lt;p&gt;Inverse data flow is the ability of React to send data from a child component to the parent component through a function, which in turn can be accessible to sibling components. There are a variety of methods that can be used to achieve the same in React, for example &lt;a href="https://dmitripavlutin.com/react-context-and-usecontext/"&gt;useContext hook&lt;/a&gt;. However if your web application is not a complex e-commerce website or something similar, you are in the right place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A. Creating React Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's create a simple React app to demonstrate this. Assuming you have npm installed, we use &lt;a href="https://reactjs.org/docs/create-a-new-react-app.html"&gt;npx create-react-app app-name&lt;/a&gt; to generate a React application. If you don't have npm installed you can &lt;a href="https://kinsta.com/blog/how-to-install-node-js/"&gt;click here&lt;/a&gt; for the installation procedure.&lt;/p&gt;

&lt;p&gt;Next, we create a &lt;em&gt;components&lt;/em&gt; folder inside the &lt;em&gt;src&lt;/em&gt; folder that will hold our parent and sibling components. The images below show our folder structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--71iL4kUb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7qg1b82zky7ketvfma4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--71iL4kUb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7qg1b82zky7ketvfma4.png" alt="Creating react app" width="880" height="296"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wWhBRGI9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zu20g24rq8ab25lhjz6p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wWhBRGI9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zu20g24rq8ab25lhjz6p.png" alt="Components structure" width="880" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9BX35zvO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ull33vcji4w9qle612dj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9BX35zvO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ull33vcji4w9qle612dj.png" alt="Output of first render" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we run our application we get an output similar to the image above.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B. Setting State&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reactjs.org/docs/hooks-state.html"&gt;useState &lt;/a&gt; hook which we import in the &lt;em&gt;ParentComponent&lt;/em&gt; helps in managing the state of a component. We use the variables defined with useState to create a function &lt;em&gt;getSiblingData&lt;/em&gt; that will be responsible for getting data inversely from the child to parent component. See image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lNYcvxo3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9o6wplyjyff6iiad2lf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lNYcvxo3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9o6wplyjyff6iiad2lf.png" alt="Setting state" width="880" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B. Getting Data from Child To Parent Component&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;&amp;lt;SiblingBrother usernameData={username} dataFromHere={getSiblingData} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We first destructure the props that we passed in the &lt;em&gt;SiblingBrother&lt;/em&gt; component (reference above), then create an &lt;em&gt;input&lt;/em&gt; text field that will get the user input. We now assign a value to the input field from the props and pass an &lt;em&gt;onChange&lt;/em&gt; function that will send the data back to our &lt;em&gt;ParentComponent&lt;/em&gt;. See the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3zbwRDnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t2pulqhsfxdrj7g8ezkt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3zbwRDnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t2pulqhsfxdrj7g8ezkt.png" alt="Data from child component" width="880" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C. Finally...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With everything in place, what remains is to pass the &lt;em&gt;username&lt;/em&gt; variable that we have defined to the &lt;em&gt;SiblingSister&lt;/em&gt; component and then render it for output. &lt;/p&gt;

&lt;p&gt;In the &lt;em&gt;ParentComponent&lt;/em&gt; image above (second image from top), there is a similar code like the one below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;SiblingSister username={username} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;em&gt;username&lt;/em&gt; props is being passed with username data from &lt;em&gt;SiblingBrother&lt;/em&gt; to &lt;em&gt;ParentComponent&lt;/em&gt; to &lt;em&gt;SiblingSister&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---7HYrLps--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f512dlfb34lcgjz981al.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---7HYrLps--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f512dlfb34lcgjz981al.png" alt="Final bit of code" width="880" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now when any data is being keyed into the input field, React updates the state and this information is then passed to the &lt;em&gt;SiblingSister&lt;/em&gt; component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QlzPbyL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ees60xytqyhs5cdsqv9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QlzPbyL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ees60xytqyhs5cdsqv9s.png" alt="Final output" width="880" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output should be as seen above. &lt;/p&gt;

&lt;p&gt;Congratulations on using inverse data flow with React.&lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>Django Or Flask (2022)? Small Scale Application</title>
      <dc:creator>Abzed Mohammed</dc:creator>
      <pubDate>Thu, 09 Jun 2022 13:31:49 +0000</pubDate>
      <link>https://dev.to/abzed/django-or-flask-2022-small-scale-application-91c</link>
      <guid>https://dev.to/abzed/django-or-flask-2022-small-scale-application-91c</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What Is Django?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.djangoproject.com/"&gt;Django&lt;/a&gt; is a Python framework for creating fast, clean, scalable and secure web application in a matter of hours. Some of the popular websites built with Django framework are &lt;a href="https://www.youtube.com/"&gt;Youtube&lt;/a&gt;, &lt;a href="https://www.instagram.com/"&gt;Instagram&lt;/a&gt;, &lt;a href="https://www.mozilla.org/"&gt;Mozilla&lt;/a&gt; and &lt;a href="https://www.spotify.com/"&gt;Spotify&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Is Flask?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.fullstackpython.com/flask.html"&gt;Flask&lt;/a&gt; is a lightweight Python microframework for creating web applications. It gives developers flexibility and an easy time for to create and run a web application. &lt;a href="https://www.netflix.com/"&gt;Netflix&lt;/a&gt;, &lt;a href="https://www.airbnb.com/"&gt;AirBNB&lt;/a&gt; and &lt;a href="https://www.reddit.com/"&gt;Reddit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Developers are often faced with challenges when it comes to choosing the right path to take when creating a web application. There are plenty of options out there, however, today we'll majorly focus on Django and Flask as a choice in creating a start up or small scale web application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Configurations And Getting Things Up and Running&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The question comes, how fast and and efficient is it to set up and run each application? We'll have a side by side comparison on the amount of time, configurations and installations required to run a "Hello world" HTML file. &lt;em&gt;See images below.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Django Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;...The first step is creating a virtual environment and installing Django&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aZfOwJhJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gsrztqwj5p67egbd7c7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aZfOwJhJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gsrztqwj5p67egbd7c7v.png" alt="Setting up Django project" width="880" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...Initial folder structure on first launch&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HOijReyQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wpwoh8l4duvatuykq9ac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HOijReyQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wpwoh8l4duvatuykq9ac.png" alt="Initial structure on first launch" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...Before using our app, we need to register it in the installed apps sections&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6DuY0C7d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2j41ba7y09vgagwxy3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6DuY0C7d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2j41ba7y09vgagwxy3z.png" alt="Register app in the installed apps sections" width="776" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...Set the file path to the app folder that will render our URLs.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_6wVkGgi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpj70xslysb1buffzg5u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_6wVkGgi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpj70xslysb1buffzg5u.png" alt="Set the path to the file responsible to render the desired template" width="880" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...After creating this file, in here we define the mapping between our views and URLs&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--snYV_SiF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ai4m0yyhfrboznyw0xiu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--snYV_SiF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ai4m0yyhfrboznyw0xiu.png" alt="After creating this file, in here we define the mapping between our views and URLs" width="593" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...Now we create our templates folder, then inside the views.py file we define a function that will render our template.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uE8mK1mZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfit775pf4czwjj7hrjf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uE8mK1mZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfit775pf4czwjj7hrjf.png" alt="Now we create a function that will render our hellow world file." width="880" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And Finally we run our application...&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0wo64zm0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tyyih7gpe9qydptct1io.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0wo64zm0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tyyih7gpe9qydptct1io.png" alt="And Finally we run our application..." width="880" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flask Setup&lt;/strong&gt;&lt;br&gt;
...The first step is a creating virtual environment and installing Flask&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Zp7gKat--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8k9o64d0ae1ypdcawkr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Zp7gKat--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8k9o64d0ae1ypdcawkr.png" alt="Creating virtual environment and installing Flask" width="880" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...Initial folder structure on first launch&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--as5nM5TB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kl2pcoomsh4yyfzbj7b7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--as5nM5TB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kl2pcoomsh4yyfzbj7b7.png" alt="Folder structure on first launch" width="399" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;... We create a single file that is responsible for rendering our desired template.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wNi-aeIX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qosku05tmbndbfl8iqg9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wNi-aeIX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qosku05tmbndbfl8iqg9.png" alt="Creating our Flask app" width="880" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And Finally we run our application...&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j5EtXPKK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4fjzq1c50gb8zx2rfw8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j5EtXPKK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4fjzq1c50gb8zx2rfw8.png" alt="We run our application" width="880" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Which One Should You Choose?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While Django comes out of the box with common functionalities such as authentication, URL routing and templating engine, it has a steep learning curve that requires indepth knowledge of the the framework. Flask on the other hand is very minimalistic and you can have the web application app and running in any way possible. This makes doing a small scale web application very easy and seamlessly. As seen above, the best option for a fast, small scale web application would be to use the Flask. &lt;/p&gt;

&lt;p&gt;However, if you have plans to develop or scale your web application in the near future, Django would be the best option because for such a project because Django is set to scale and grow and has a large supporting communinity of developers.&lt;/p&gt;

</description>
      <category>django</category>
      <category>flask</category>
    </item>
  </channel>
</rss>
