<?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: Shuaib Oseni</title>
    <description>The latest articles on DEV Community by Shuaib Oseni (@shosenwales).</description>
    <link>https://dev.to/shosenwales</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%2F329714%2F817b69ab-0522-4a88-b0ca-500d26ad4adb.jpg</url>
      <title>DEV Community: Shuaib Oseni</title>
      <link>https://dev.to/shosenwales</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shosenwales"/>
    <language>en</language>
    <item>
      <title>Steps to manipulating Postgres database with AI</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Tue, 28 Jan 2025 12:12:37 +0000</pubDate>
      <link>https://dev.to/hackmamba/steps-to-manipulating-postgres-database-with-ai-9n4</link>
      <guid>https://dev.to/hackmamba/steps-to-manipulating-postgres-database-with-ai-9n4</guid>
      <description>&lt;p&gt;According to &lt;a href="https://survey.stackoverflow.co/2024/technology#1-databases" rel="noopener noreferrer"&gt;StackOverflow's 2024 developer survey&lt;/a&gt;, PostgreSQL's popularity has steadily risen, from 26% in 2017 to 49% in 2024, making it the most popular database management system and a go-to choice for developers and enterprises. &lt;/p&gt;

&lt;p&gt;However, managing complex queries and database operations in PostgreSQL can be tedious and time-consuming, especially when dealing with complex syntax and logic. That is where &lt;a href="https://sourcegraph.com/cody" rel="noopener noreferrer"&gt;Cody&lt;/a&gt; comes in—an AI programming assistant designed to help you quickly understand, write, review, and optimize complex database queries and operations.&lt;/p&gt;

&lt;p&gt;This guide will explore how Cody can be paired with PostgreSQL to simplify tasks like optimizing queries and managing complex database operations such as table creation and data retrieval. To set the stage for how Cody can improve your PostgreSQL workflow, let’s take a brief look at PostgreSQL itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is PostgreSQL?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.postgresql.org/" rel="noopener noreferrer"&gt;PostgreSQL&lt;/a&gt;, also known as Postgres, is a powerful, open-source &lt;strong&gt;object-relational database management system (ORDBMS)&lt;/strong&gt; known for reliability, feature robustness, and performance. Its compatibility with various platforms and programming languages further enhances its appeal, making it easier for developers to integrate PostgreSQL into different technology stacks. Developers and businesses also widely use PostgreSQL databases because they can handle complex queries and large amounts of data easily.&lt;/p&gt;

&lt;p&gt;One of PostgreSQL's key strengths is its support for various data types. PostgreSQL supports common data types like integers and text and more advanced types like JSONB and arrays, making it adaptable to different application needs. This flexibility in handling PostgreSQL data types ensures that developers can structure their data in ways that best suit their projects.&lt;/p&gt;

&lt;p&gt;Another advantage is the active PostgreSQL community, which continuously contributes to the database's development and improvement. The comprehensive &lt;a href="https://www.postgresql.org/docs/" rel="noopener noreferrer"&gt;PostgreSQL documentation&lt;/a&gt; the community provides is helpful, and it offers detailed guidance on how to insert data, delete data, and perform other important operations. Whether you are a PostgreSQL newbie or have years of experience, the documentation provides clear guidance on best practices, helping you manage operations and &lt;a href="https://www.postgresql.org/docs/current/performance-tips.html" rel="noopener noreferrer"&gt;enhance your database performance&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With that in mind, let's move on to setting up the development environment, where you'll see how Cody can assist in managing your database operations.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting up the development environment
&lt;/h1&gt;

&lt;p&gt;To follow along with this tutorial, you’ll need to have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic understanding of PostgreSQL&lt;/li&gt;
&lt;li&gt;PostgreSQL &lt;a href="https://www.postgresql.org/" rel="noopener noreferrer"&gt;installed on your computer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;IDE or code editor (this tutorial will use &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;V&lt;/a&gt;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;isual&lt;/a&gt; &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;S&lt;/a&gt;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;tudio&lt;/a&gt; &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Code&lt;/a&gt; &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;(VSCode&lt;/a&gt;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;)&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To proceed, connect your IDE (VSCode) to your PostgreSQL server. To do this, you need to install the &lt;a href="https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools" rel="noopener noreferrer"&gt;&lt;strong&gt;SQLTools extension&lt;/strong&gt;&lt;/a&gt; from the VSCode extensions section:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7d7l168uldvezid0ptsx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7d7l168uldvezid0ptsx.png" alt="Installing SQLTools Extension" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you need to install &lt;a href="https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools-driver-pg" rel="noopener noreferrer"&gt;SQLTool’s driver&lt;/a&gt; extension:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fk2soevmdatywo9ebxmoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fk2soevmdatywo9ebxmoj.png" alt="SQLTools driver" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To complete the connection process, click on the SQLTools icon and provide the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Connection name&lt;/code&gt;: identifier for a database connection&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Server address&lt;/code&gt;: server address of the PostgreSQL server&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Port&lt;/code&gt;: port to connect to the PostgreSQL server&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Database&lt;/code&gt;: name of the database&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Username&lt;/code&gt;: PostgreSQL server username&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fy2oxcqnqfbb44z5seu5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fy2oxcqnqfbb44z5seu5e.png" alt="Selecting PostgreSQL as the preferred database driver" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ff0xdmxl3vc1leqzz64ht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ff0xdmxl3vc1leqzz64ht.png" alt="Required connection fields" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Localhost is used for the "server address" field because the PostgreSQL server runs locally.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next, click &lt;strong&gt;Save Connection&lt;/strong&gt; to save your connection settings. Then, click &lt;strong&gt;Connect&lt;/strong&gt; to connect to PostgreSQL:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fzovq7sft2t0usdcbpg2b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fzovq7sft2t0usdcbpg2b.png" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With that, your PostgreSQL setup is complete:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fpqs8eztk6soph45hkxd1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fpqs8eztk6soph45hkxd1.png" alt="PostgreSQL connection completed" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, to use Cody, you have to install and setup the Cody extension in VSCode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7yqbf7mw6cu77loon5f5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7yqbf7mw6cu77loon5f5.png" alt="Cody VSCode extension" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cody supports other IDEs, including IntelliJ (or any other JetBrains IDE) and Neovim&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After installing the Cody extension, you’ll receive a prompt to authenticate. Create an &lt;a href="https://sourcegraph.com/cody" rel="noopener noreferrer"&gt;account&lt;/a&gt; using one of these authentication methods - &lt;strong&gt;GitHub, GitLab, or Google&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ftuh9kc49nbmhrn23rdov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ftuh9kc49nbmhrn23rdov.png" alt="Cody VS Code authentication screen." width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To fully explore how Cody can enhance database operations, let's look into the specifics of creating, modifying, and even deleting tables in a PostgreSQL database.&lt;/p&gt;

&lt;h1&gt;
  
  
  Executing PostgreSQL operations
&lt;/h1&gt;

&lt;p&gt;Using the scenario below, let's explore how to handle essential operations in PostgreSQL, starting with traditional SQL commands and then showing how Cody simplifies the process:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build a blogging platform&lt;/strong&gt;&lt;strong&gt;:&lt;/strong&gt; For this platform, you'll need to set up a &lt;code&gt;users&lt;/code&gt; table to store user information and a &lt;code&gt;posts&lt;/code&gt; table to store blog entries. As the platform evolves, you'll need to modify your database structure by adding or deleting columns based on new features or removing tables that are no longer needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating tables in the Postgres database
&lt;/h2&gt;

&lt;p&gt;First, you’ll need to create a &lt;code&gt;users&lt;/code&gt; table to store information about the bloggers, including their ID, username, email, and the date they joined. You’ll also create a &lt;code&gt;posts&lt;/code&gt; table to store blog entries, including the post content, title, and the ID of the user who created the post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manual method&lt;/strong&gt;&lt;br&gt;
Writing SQL commands to create tables requires a solid understanding of SQL syntax. When dealing with complex table structures, this can be challenging for beginners and error-prone for experienced developers. A minor syntax mistake can lead to errors that are sometimes difficult to debug.&lt;/p&gt;

&lt;p&gt;To create the &lt;code&gt;users&lt;/code&gt; table, you would have something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;     &lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; 
          &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="nb"&gt;SERIAL&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
          &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
          &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
          &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="nb"&gt;TIMESTAMP&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="k"&gt;CURRENT_TIMESTAMP&lt;/span&gt; 
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In complex projects like a blogging platform, manually managing table relationships (such as foreign keys) adds an additional layer of complexity, increasing the chance of mistakes that may go unnoticed until runtime.&lt;/p&gt;

&lt;p&gt;Creating the &lt;code&gt;posts&lt;/code&gt; table will look like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;    &lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="nb"&gt;SERIAL&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="nb"&gt;TIMESTAMP&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="k"&gt;CURRENT_TIMESTAMP&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;AI assisted method&lt;/strong&gt; &lt;br&gt;
Leveraging Cody’s &lt;a href="https://sourcegraph.com/docs/cody/capabilities/chat" rel="noopener noreferrer"&gt;&lt;code&gt;chat feature&lt;/code&gt;&lt;/a&gt; simplifies table creation by interpreting natural language commands and generating the appropriate SQL. This reduces the need to remember the precise syntax, making the process more intuitive and significantly faster.&lt;/p&gt;

&lt;p&gt;In VS Code, press &lt;code&gt;Alt + K (or Opt + K)&lt;/code&gt; to open the command palette, and type the prompt below:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;write a postgresql query to create a users table with id, username, 
email, and a created_at timestamp. 
Also, create a posts table with id, user_id, title, 
content, and created_at.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div&gt;
  &lt;iframe src="https://loom.com/embed/8ee4fc28d221449886e66ace41b829cd"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;



&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Once the code has been generated, click &lt;strong&gt;Accept&lt;/strong&gt; to save it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fgzezg532vmtkyc8svwwi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgzezg532vmtkyc8svwwi.png" alt="SQL query generated by Cody" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can then run the query by clicking on the &lt;code&gt;Run on active connection&lt;/code&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fgrm5v8aupf9auhuct1pn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgrm5v8aupf9auhuct1pn.png" alt="Database tables created by Cody" width="800" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Modifying tables
&lt;/h2&gt;

&lt;p&gt;As your blogging platform expands, you may realize that you need to track users' last login times. To do this, add a &lt;code&gt;last_login&lt;/code&gt; column to the &lt;code&gt;users&lt;/code&gt; table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manual method&lt;/strong&gt;&lt;br&gt;
Modifying existing tables can be risky, as any mistake might result in data loss or unintended structural changes. As a developer, you must be very precise when altering tables to avoid breaking dependencies within the database schema.&lt;/p&gt;

&lt;p&gt;To add a &lt;code&gt;last_login&lt;/code&gt; column, you would have something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;    &lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;ADD&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;last_login&lt;/span&gt; &lt;span class="nb"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;AI&lt;/strong&gt;&lt;strong&gt;-&lt;/strong&gt;&lt;strong&gt;assisted method&lt;/strong&gt;&lt;br&gt;
Cody enhances the experience of modifying tables by allowing you to simply describe what changes are needed. This saves time and ensures that the query generated will not overlook important details like data types or column constraints. &lt;/p&gt;

&lt;p&gt;You can use the following prompt to modify the &lt;code&gt;users&lt;/code&gt; table:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add a last_login column to the users table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Cody generates the query for you, as demonstrated in this video:&lt;/p&gt;


&lt;div&gt;
  &lt;iframe src="https://loom.com/embed/48f58c8465f84a6ebbac811c5c993acf"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;



&lt;p&gt; &lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;    &lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;
    &lt;span class="k"&gt;ADD&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;last_login&lt;/span&gt; &lt;span class="nb"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fyuusihhmoi6ycslc6o4o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fyuusihhmoi6ycslc6o4o.png" alt="Cody’s response" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Writing complex queries
&lt;/h1&gt;

&lt;p&gt;You often need to write complex queries to get meaningful data from your database. For instance, for the blogging platform, you might need to identify the most active users, analyze post engagement, or retrieve data filtered by specific criteria like date ranges or popularity. The PostgreSQL database offers powerful querying capabilities, but constructing these complex queries manually can be challenging.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performing joins with conditions
&lt;/h2&gt;

&lt;p&gt;Imagine wanting to retrieve a list of posts along with the usernames of the authors who posted them, but only if those posts have more than 100 likes. This involves combining data from two tables &lt;code&gt;users&lt;/code&gt; and &lt;code&gt;posts&lt;/code&gt; with an additional condition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manual method&lt;/strong&gt;&lt;br&gt;
To join tables with additional conditions requires understanding how to structure the query efficiently. Managing table joins with additional conditions can lead to complex queries, especially when dealing with large datasets or multiple join conditions. It’s easy to make mistakes when specifying the relationships between tables or writing the conditions.&lt;/p&gt;

&lt;p&gt;Using the manual method to get the titles of posts and the usernames of the authors, but only for posts with more than 100 likes, you would have this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;
    &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;
    &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;likes&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AI assisted method&lt;/strong&gt;&lt;br&gt;
To do this with Cody, all you need to do is prompt it:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query to get the titles of posts and the usernames of their authors, but only for posts with more than 100 likes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Cody's response:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fidmkau5nnrbplvo7lfr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fidmkau5nnrbplvo7lfr6.png" alt="Output from Cody" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Combining aggregations and conditions
&lt;/h2&gt;

&lt;p&gt;Consider finding users who have written more than five posts but only those published in the current year. This requires combining aggregation with conditional filtering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manual method&lt;/strong&gt;&lt;br&gt;
Managing complex conditions with aggregation functions can be challenging, as the logic must be applied before and after the aggregation.&lt;/p&gt;

&lt;p&gt;Doing this manually would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;post_count&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;
    &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;
    &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;EXTRACT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;YEAR&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;created_at&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;EXTRACT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;YEAR&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;CURRENT_DATE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;
    &lt;span class="k"&gt;HAVING&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AI assisted method (Cody custom commands)&lt;/strong&gt;&lt;br&gt;
With Cody, you can simplify this process by using its commands feature, which offers ready-to-use &lt;a href="https://sourcegraph.com/docs/cody/capabilities/commands#commands" rel="noopener noreferrer"&gt;commands&lt;/a&gt; for common tasks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generating code documentation&lt;/li&gt;
&lt;li&gt;improving code quality&lt;/li&gt;
&lt;li&gt;fixing and generating new code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, for an efficient workflow, Cody allows you to create custom commands that can automate tasks related to your database interactions. To create a custom command: &lt;/p&gt;

&lt;p&gt;First, press &lt;strong&gt;Alt + C (or Opt + C)&lt;/strong&gt;, then select &lt;strong&gt;Configure Custom Commands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fajn5zxi3ot5bvmxh1fls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fajn5zxi3ot5bvmxh1fls.png" alt="Creating custom command" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, select the &lt;strong&gt;New Custom Command&lt;/strong&gt; option&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fm4iaayufvav3592lvyjk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fm4iaayufvav3592lvyjk.png" alt="Creating custom command" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then enter &lt;strong&gt;PostgresAdmin&lt;/strong&gt; as the command name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fepyn3ki96qf4npahgu6l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fepyn3ki96qf4npahgu6l.png" alt="Providing name for the custom command" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, select &lt;strong&gt;Ask&lt;/strong&gt; for the command mode, which controls how Cody interacts with the editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F3ayk83a897eoenfks8h2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F3ayk83a897eoenfks8h2.png" alt="Selecting a command mode" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now enter the prompt below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Provide query to find users who have written more than five posts this year.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, check the &lt;strong&gt;Selected Code&lt;/strong&gt; and &lt;strong&gt;Current File&lt;/strong&gt; box; this grants the newly created command access to the highlighted source code and the current file you are working with:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F1zh6vo061vpcfctqpr70.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1zh6vo061vpcfctqpr70.png" alt="Selecting context options" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, select the &lt;strong&gt;Workspace Settings&lt;/strong&gt; to store the command for this workspace:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fumtnr1viu5fsx8akx31b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fumtnr1viu5fsx8akx31b.png" alt="Saving the custom command" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you can use the custom command to find users who have written more than five posts, but only those published in the current year.&lt;/p&gt;

&lt;p&gt;To do this, click the Cody extension icon and select your newly created &lt;strong&gt;PostgresAdmin&lt;/strong&gt; command:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Feeh3wxy8yutt8y3h7vsy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Feeh3wxy8yutt8y3h7vsy.png" alt="Our PostgresAdmin command" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Foddtgp8ob3u8txftz9se.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Foddtgp8ob3u8txftz9se.png" alt="Cody's response" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Manually writing complex queries offers full control but can be error-prone and time-consuming, especially for more intricate operations like joins, subqueries, and conditional filtering. Cody simplifies these processes by interpreting natural language descriptions and generating accurate queries. This reduces the likelihood of errors and speeds up the workflow, making managing even the most complex database operations easier.&lt;/p&gt;

&lt;h1&gt;
  
  
  Wrapping up
&lt;/h1&gt;

&lt;p&gt;Using AI coding assistants like Cody to assist with PostgreSQL database operations can improve productivity and reduce the challenges associated with manual coding. This allows developers to focus more on higher-level tasks, such as optimizing the platform and implementing new features, instead of getting bogged down by complex SQL syntax.&lt;/p&gt;

&lt;p&gt;However, it’s essential to approach AI-assisted database management with a balance of trust and caution. While &lt;a href="https://sourcegraph.com/cody" rel="noopener noreferrer"&gt;Cody&lt;/a&gt; automates many processes, make sure to always review AI-generated queries, especially for critical operations involving complex logic or sensitive data. Give &lt;a href="https://sourcegraph.com/cody" rel="noopener noreferrer"&gt;Cody&lt;/a&gt; a try today!&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>webdev</category>
      <category>sourcegraph</category>
    </item>
    <item>
      <title>Build proof of concept in 5 minutes with Cody AI</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Fri, 29 Nov 2024 15:25:41 +0000</pubDate>
      <link>https://dev.to/hackmamba/build-proof-of-concept-in-5-minutes-with-cody-ai-boe</link>
      <guid>https://dev.to/hackmamba/build-proof-of-concept-in-5-minutes-with-cody-ai-boe</guid>
      <description>&lt;p&gt;Launching a brilliant project idea, only to discover later that it doesn't meet your users' needs or isn't feasible within your technical limits, can significantly slow progress. In software development, building, testing, and gathering feedback early on are crucial steps to avoid these pitfalls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sourcegraph.com/cody" rel="noopener noreferrer"&gt;Cody&lt;/a&gt; is an AI coding assistant created by Sourcegraph to assist developers and engineering teams in understanding, writing, reviewing, and refactoring code, speeding up code generation and software development. This article will begin by discussing the key aspects of creating a &lt;strong&gt;proof of concept (PoC)&lt;/strong&gt;, including the best times to implement one, common use cases, and the benefits of incorporating a PoC into your project development workflow. &lt;/p&gt;

&lt;p&gt;We'll also explore the next steps after successfully validating your project idea with a PoC and how to transition toward a &lt;strong&gt;m&lt;/strong&gt;&lt;strong&gt;inimum&lt;/strong&gt; &lt;strong&gt;v&lt;/strong&gt;&lt;strong&gt;iable&lt;/strong&gt; &lt;strong&gt;p&lt;/strong&gt;&lt;strong&gt;roduct (MVP)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;After covering these foundational topics, the article will walk through how to leverage Cody to build a PoC quickly, showcasing its capabilities in planning, coding, and refining a book review app.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is a proof of concept, and how does it work in software development?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A PoC is an important piece in the software development process and is often a pivotal part of business development. It involves building a simplified version of an application to verify the feasibility of a business idea from a technical and practical standpoint. The goal of a POC is to demonstrate whether the core concept can be realized using the available technology and resources.&lt;/p&gt;

&lt;p&gt;By implementing a PoC, you can test essential functionalities, identify potential challenges, and collect user feedback to refine the project before moving forward with full-scale development. This feedback is vital in ensuring your product aligns with user needs, reducing risks, and informing future development decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key steps to creating a PoC for your project idea
&lt;/h2&gt;

&lt;p&gt;Each step of creating a PoC is crucial for developers and project managers, who oversee the alignment of the project’s objectives and ensure that the PoC process meets both technical and business goals. Here’s a process to follow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Define the project scope&lt;/strong&gt;: Identify the core features and functionalities the PoC must demonstrate. This involves drafting a detailed requirements document and setting clear objectives for what the PoC should accomplish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan the architecture&lt;/strong&gt;: Sketch the system architecture, focusing on the elements needed to test the product idea. This may include the design of databases, APIs, and integrations with third-party services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up the&lt;/strong&gt; &lt;strong&gt;d&lt;/strong&gt;&lt;strong&gt;evelopment&lt;/strong&gt; &lt;strong&gt;environment&lt;/strong&gt;: Prepare the technical environment necessary for development, including installing the required tools and libraries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Develop the PoC&lt;/strong&gt;: Start building the PoC and implement the core features identified earlier. This stage is about proving technical feasibility rather than delivering a polished product.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test and refine&lt;/strong&gt;: Once the PoC is built, test it thoroughly to identify any issues or potential improvements. Gather feedback from stakeholders to determine if the PoC meets the intended goals.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Project management tools can further streamline this process by helping track progress, manage timelines, and facilitate collaboration between the development team and stakeholders.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpaper-attachments.dropboxusercontent.com%2Fs_EE80D3F13C4E029D01985823D341402D07679200B480D1F0F6B069A106753F44_1724839105914_Steps_to_creating_a_PoC.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpaper-attachments.dropboxusercontent.com%2Fs_EE80D3F13C4E029D01985823D341402D07679200B480D1F0F6B069A106753F44_1724839105914_Steps_to_creating_a_PoC.webp" alt="Steps to creating a PoC" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With a clear understanding of what a PoC is and how it can help validate a project idea, the next step is to set up the development environment to start building the book review app.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting up the development environment
&lt;/h1&gt;

&lt;p&gt;For this PoC, Django will be used as the framework, and the development environment will be set up on Windows.&lt;/p&gt;

&lt;p&gt;To build your PoC, you first need to set up the development environment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;While this tutorial will use Django, the methodology can be used across any framework.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Start by creating a new virtual environment &lt;code&gt;env&lt;/code&gt; by running the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    python &lt;span class="nt"&gt;-m&lt;/span&gt; venv &lt;span class="nb"&gt;env&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This command tells Python to create the virtual environment in a folder named &lt;code&gt;env&lt;/code&gt; in the current directory.&lt;/p&gt;

&lt;p&gt;On creation, the virtual environment is activated using the following:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="c"&gt;#windows&lt;/span&gt;
    &lt;span class="nb"&gt;env&lt;/span&gt;&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate

    &lt;span class="c"&gt;#linux&lt;/span&gt;
    &lt;span class="nb"&gt;source env&lt;/span&gt;/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;On activating the environment, you can install Django using the following command:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    pip &lt;span class="nb"&gt;install &lt;/span&gt;django
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With your Django environment ready, the next step is to set up Cody. To do that, follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Sign up for a &lt;a href="https://sourcegraph.com/" rel="noopener noreferrer"&gt;Sourcegraph&lt;/a&gt; account using a preferred authentication method—GitHub, GitLab, or Google.&lt;br&gt;
&lt;a href="https://media2.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%2F06iffb6lmrxx0bwdxcnm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F06iffb6lmrxx0bwdxcnm.png" alt="Cody sign up screen" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install Cody for any of &lt;a href="https://sourcegraph.com/docs/cody/clients" rel="noopener noreferrer"&gt;Sourcegraph's supported IDE&lt;/a&gt; - &lt;a href="https://marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt;, IntelliJ (or any other JetBrains IDE), or Neovim.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;NB: VS Code is the IDE used throughout this article.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fq7jlrblj14mf0ys50hm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fq7jlrblj14mf0ys50hm2.png" alt="Signing into Cody via VS Code" width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once Cody is installed and set up in your development environment, you can leverage its capabilities to plan and develop an application.&lt;/p&gt;
&lt;h1&gt;
  
  
  Planning the project with Cody
&lt;/h1&gt;

&lt;p&gt;The plan is to build a book review app that allows users to add, view, and delete book reviews. Before going into the technical details, it's important to understand how leveraging an AI coding assistant like Cody for project planning can provide significant advantages and streamline development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of using AI for project planning&lt;/strong&gt;&lt;br&gt;
One of the key challenges in software development is the initial planning phase, where decisions can significantly influence the project's success. Traditionally, project planning involves a lot of manual effort, from defining requirements to architecting the system. This process can be time-consuming, prone to oversight, and requires extensive expertise to cover all critical aspects.&lt;/p&gt;

&lt;p&gt;Below are some of the advantages of using AI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Speed and&lt;/strong&gt; &lt;strong&gt;e&lt;/strong&gt;&lt;strong&gt;fficiency&lt;/strong&gt;: AI can quickly generate ideas, suggest features, and outline project structures based on best practices. What might take hours of brainstorming and research can be &lt;a href="https://sourcegraph.com/blog/improving-cody-autocomplete-faster-smarter" rel="noopener noreferrer"&gt;accomplished in minutes&lt;/a&gt; with AI assistance.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://sourcegraph.com/blog/cody-the-ai-powered-tool-helping-support-engineers-unblock-themselves" rel="noopener noreferrer"&gt;&lt;strong&gt;Reduced&lt;/strong&gt;&lt;/a&gt; &lt;a href="https://sourcegraph.com/blog/cody-the-ai-powered-tool-helping-support-engineers-unblock-themselves" rel="noopener noreferrer"&gt;&lt;strong&gt;c&lt;/strong&gt;&lt;/a&gt;&lt;a href="https://sourcegraph.com/blog/cody-the-ai-powered-tool-helping-support-engineers-unblock-themselves" rel="noopener noreferrer"&gt;&lt;strong&gt;ognitive&lt;/strong&gt;&lt;/a&gt; &lt;a href="https://sourcegraph.com/blog/cody-the-ai-powered-tool-helping-support-engineers-unblock-themselves" rel="noopener noreferrer"&gt;&lt;strong&gt;l&lt;/strong&gt;&lt;/a&gt;&lt;a href="https://sourcegraph.com/blog/cody-the-ai-powered-tool-helping-support-engineers-unblock-themselves" rel="noopener noreferrer"&gt;&lt;strong&gt;oad&lt;/strong&gt;&lt;/a&gt;: Planning a project can be mentally draining, especially when juggling multiple aspects like functionality, architecture, and user experience. AI coding assistants like Cody can ease this burden by taking on the role of a brainstorming partner, providing options, and helping think through complex decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterative&lt;/strong&gt; &lt;strong&gt;r&lt;/strong&gt;&lt;strong&gt;efinement&lt;/strong&gt;: With AI, you can easily iterate on your plans. If initial ideas don't seem feasible or need adjustment, It can help refine them without starting from scratch. This flexibility allows for a more adaptive planning process responding to changing needs or insights.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Integrating AI into the project planning phase sets the stage for a more organized and efficient development process. With clear requirements, defined features, and a solid architecture, the subsequent coding and testing phases become much smoother. AI's ability to quickly adapt and provide real-time feedback ensures that your project remains aligned with its goals.&lt;/p&gt;

&lt;p&gt;Now, let's use &lt;a href="https://sourcegraph.com/docs/cody/capabilities/chat" rel="noopener noreferrer"&gt;Cody’s chat feature&lt;/a&gt; to plan the book review app by assisting in defining the app's:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;requirements&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;features&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;architecture&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Cody supports the latest LLMs, including Claude 3.5, GPT-4o, Gemini 1.5, and Mixtral-8x7B. Cody uses Claude 3.5 Sonnet by default, but you can upgrade to pro to access other models like GPT-4o and Gemini 1.5 Pro.&lt;br&gt;
This tutorial uses GPT-4o.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fzdn864qtru10m3h9yuzp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fzdn864qtru10m3h9yuzp.png" alt="Prompting Cody to help with our PoC project" width="800" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fm6aigt9wi4b61lx321wn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fm6aigt9wi4b61lx321wn.png" alt="Cody helping with the book review app requirements" width="800" height="671"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F89zc998xljbaw7k95ilv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F89zc998xljbaw7k95ilv.png" alt="Cody helping with the book review app features" width="800" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F9a3ds5mq0fpztdi224ez.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F9a3ds5mq0fpztdi224ez.png" alt="Cody helping with the book review app architecture" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Developing the app with Cody
&lt;/h1&gt;

&lt;p&gt;Traditionally, developing a PoC involves several key steps that are undertaken manually:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Defining the project scope&lt;/strong&gt;: The core features and functionalities that the PoC should demonstrate are identified, typically involving drafting a detailed requirements document.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setting up the project structure&lt;/strong&gt;: Next, the necessary directories and files for the project are created, version control like Git is set up, and folders are organized for code and documentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing initial code&lt;/strong&gt;: The basic functionalities are coded, which usually includes setting up a web server, defining models, establishing the database, and writing functions to handle CRUD (&lt;strong&gt;Create, Read, Update, Delete&lt;/strong&gt;) operations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing&lt;/strong&gt;: Finally, test cases are manually written and run to ensure that the basic functionalities work as expected, often involving unit tests for individual components and integration tests to verify how different parts of the application interact.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach, while effective, can be time-consuming and requires significant manual effort.&lt;/p&gt;

&lt;p&gt;In comparison, an AI-assisted approach with tools like Cody simplifies the development process. AI significantly reduces the time needed to build and polish a PoC by automating routine tasks, generating foundational code, and offering real-time guidance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpaper-attachments.dropboxusercontent.com%2Fs_EE80D3F13C4E029D01985823D341402D07679200B480D1F0F6B069A106753F44_1724592798419_Traditional_vs_AI-assisted_PoC_development..webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpaper-attachments.dropboxusercontent.com%2Fs_EE80D3F13C4E029D01985823D341402D07679200B480D1F0F6B069A106753F44_1724592798419_Traditional_vs_AI-assisted_PoC_development..webp" width="681" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s begin the app development process by prompting Cody to set up a new Django project and app:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F871lo4k90wz4iwy2as1e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F871lo4k90wz4iwy2as1e.png" alt="Prompting Cody to set up a Django project and app" width="800" height="733"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Ffyrpybdd8j4o8h8o9h93.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffyrpybdd8j4o8h8o9h93.png" alt="Cody responding with code snippets for the app’s model" width="800" height="756"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fnxw31git7lzg983xa252.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fnxw31git7lzg983xa252.png" alt="Creating migrations for our app" width="800" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After setting up the project and app, prompt Cody to create the app’s &lt;code&gt;views&lt;/code&gt; and &lt;code&gt;templates&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fettcd09o5objcxl5v5ym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fettcd09o5objcxl5v5ym.png" alt="Creating views and templates" width="800" height="757"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fncghssa307e9km2uejpw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fncghssa307e9km2uejpw.png" alt="Adding a form" width="800" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2buwmeaotzo3rfvg366k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2buwmeaotzo3rfvg366k.png" alt="Fixing URL routing" width="800" height="714"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, prompt Cody to suggest how to implement the search and filter functionality, as shown in the images below. While Cody provides the necessary steps and code snippets, you'll follow its instructions to create the files:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fgobhnkuhg0igcnmh8f70.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgobhnkuhg0igcnmh8f70.png" alt="Implementing search functionality" width="749" height="811"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Fwk8haait03ugydde30fp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fwk8haait03ugydde30fp.png" alt="Updating templates" width="800" height="508"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Fc6nwzzm4brrxi5pwdbl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fc6nwzzm4brrxi5pwdbl7.png" alt="Updating templates" width="800" height="630"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What’s a PoC app without basic styling? Cody can help with that, as illustrated in the images below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fikllw3hqplbyav24lhsj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fikllw3hqplbyav24lhsj.png" alt="Adding styling to the app" width="800" height="620"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.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%2F6sb8sbrp1ur6okfr6u0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6sb8sbrp1ur6okfr6u0v.png" alt="Adding styling to the app" width="800" height="551"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.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%2Ffxu6mdxa1jrv34yzebka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffxu6mdxa1jrv34yzebka.png" alt="Adding styling to the app" width="800" height="684"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s test this out by starting the server with the following command:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div&gt;
  &lt;iframe src="https://loom.com/embed/8d864596e5e943f8b37347c86821d554"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;



&lt;h1&gt;
  
  
  Testing the PoC
&lt;/h1&gt;

&lt;p&gt;While writing code is essential, ensuring that the code performs correctly under various conditions is equally important. Traditionally, the typical approach to testing a PoC involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manual test case writing&lt;/strong&gt;: As developers, you manually write test cases for various application components, ensuring each function behaves as expected. This might include &lt;strong&gt;unit tests&lt;/strong&gt; for individual functions, &lt;strong&gt;integration tests&lt;/strong&gt; for combined modules, and &lt;strong&gt;functional tests&lt;/strong&gt; to simulate user interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debugging&lt;/strong&gt;: When issues are identified during testing, the code is manually debugged, the source of errors tracked, and fixes applied. This often involves repetitive cycles of testing, identifying bugs, and refining the code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refinement&lt;/strong&gt;: Based on the outcomes of testing and debugging, the code is refined iteratively. This process continues until the application meets the desired performance and stability standards.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The traditional approach explained above relies heavily on the ability to anticipate potential issues, which can sometimes result in overlooked bugs or inefficiencies. However, AI can significantly enhance the testing and refinement process. For example, Cody can assist in the following ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test case generation&lt;/strong&gt;: Cody can quickly generate test cases based on written code. Using Cody's &lt;a href="https://sourcegraph.com/docs/cody/capabilities/commands#commands" rel="noopener noreferrer"&gt;command&lt;/a&gt; feature, simply highlight the specific code area you want to test; in this case, the &lt;code&gt;Review&lt;/code&gt; model and Cody automatically generates the relevant unit tests.&lt;br&gt;
&lt;a href="https://media2.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%2Fo2lcahd07h10adc20eqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fo2lcahd07h10adc20eqv.png" alt="Test case generation" width="800" height="315"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Refinement suggestions&lt;/strong&gt;: Cody can continuously provide recommendations for optimizing and refining your code. When prompted, Cody will analyze our code and offer suggestions on ways to improve the book review app's performance, as demonstrated in the images below. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fkc5lrpv856po56h5h14y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fkc5lrpv856po56h5h14y.png" alt="Prompting Cody for ways to improve the app" width="800" height="668"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.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%2F9cq1nu1wm3qs0i3ttpvz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F9cq1nu1wm3qs0i3ttpvz.png" alt="Prompting Cody for ways to improve the app" width="800" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based on the examples above, the AI-assisted approach to testing and refinement offers several key benefits. It speeds up the process by automating tasks like test case generation, leading to faster iterations. Additionally, it enhances efficiency by handling routine tasks, allowing us to focus on other aspects of the project.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is the best time to implement a PoC?
&lt;/h1&gt;

&lt;p&gt;The best time to implement a PoC is during the &lt;strong&gt;early stages&lt;/strong&gt; of the software development process, especially when you're exploring a new product idea or tackling an unfamiliar technical challenge. A PoC is particularly useful when the feasibility of a solution is uncertain or when stakeholders need tangible proof that the concept can be realized before committing to full-scale development.&lt;/p&gt;

&lt;p&gt;For startups and small teams, a PoC can also be a valuable tool for securing investors' support by demonstrating a product's viability. Additionally, enterprises can use PoCs to experiment with emerging technologies or new business models without fully integrating them into their existing systems.&lt;/p&gt;

&lt;h1&gt;
  
  
  Common use cases and concept examples for PoC
&lt;/h1&gt;

&lt;p&gt;Now that you understand when to implement a PoC, it’s important to explore the scenarios where PoCs are most commonly used. Across various industries, PoCs provide clarity and reduce risks, particularly in high-innovation areas. Here are some typical use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exploring new technologies&lt;/strong&gt;: When adopting new frameworks, languages, or tools, a PoC can help determine whether they fit within your existing infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T&lt;/strong&gt;&lt;strong&gt;esting market demand&lt;/strong&gt;: Before developing a full product, companies may create a PoC to gauge interest and gather feedback from early adopters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Addressing technical uncertainties&lt;/strong&gt;: If a particular feature or integration presents challenges, a PoC can help validate the feasibility of the solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experimenting with business models&lt;/strong&gt;: Companies may use PoCs to test new business models or services before scaling them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of PoC
&lt;/h2&gt;

&lt;p&gt;With the various use cases in mind, it becomes clear why PoCs are so valuable. Implementing a PoC provides multiple benefits that can improve both the project outcome and the development process's efficiency. Some of the key benefits include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Risk reduction&lt;/strong&gt;: By testing the feasibility of the product idea early on, you can identify potential technical hurdles and resolve them before investing significant resources.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Early feedback&lt;/strong&gt;: PoCs allow you to collect user feedback early in the development process from stakeholders and potential users. This feedback is invaluable for refining the product before committing to full development, ensuring that the final product aligns with user needs and expectations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved decision&lt;/strong&gt;&lt;strong&gt;-&lt;/strong&gt;&lt;strong&gt;making&lt;/strong&gt;: With a PoC, you have a clearer understanding of the project's viability, making it easier to decide whether to move forward, pivot, or abandon the concept.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource efficiency&lt;/strong&gt;: PoC's also help ensure that you only commit resources to ideas that have been validated, reducing waste and optimizing development efforts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Success criteria and next steps after a proof of concept
&lt;/h1&gt;

&lt;p&gt;Once your PoC has demonstrated the feasibility of your product idea, the next step is moving toward developing a &lt;strong&gt;m&lt;/strong&gt;&lt;strong&gt;inimum&lt;/strong&gt; &lt;strong&gt;v&lt;/strong&gt;&lt;strong&gt;iable&lt;/strong&gt; &lt;strong&gt;p&lt;/strong&gt;&lt;strong&gt;roduct (MVP)&lt;/strong&gt;. This transition allows you to take the core functionalities proven in the PoC and expand them into a version of the product that real users can use and test. An MVP offers an excellent opportunity to gather more detailed feedback and make iterative improvements before scaling further.&lt;/p&gt;

&lt;p&gt;However, if the PoC fails to meet expectations, don't see it as a setback. Instead, use the insights from the PoC to refine your approach, pivot to a different solution, or explore alternative directions.&lt;/p&gt;

&lt;h1&gt;
  
  
  Wrapping up
&lt;/h1&gt;

&lt;p&gt;Traditional and AI-assisted approaches to developing a proof of concept each have unique advantages. The traditional method is well-established and provides full control over each step, making it a reliable choice for development teams that prefer hands-on coding. However, when &lt;strong&gt;speed, efficiency, and adaptability&lt;/strong&gt; are key, an AI-assisted approach, like using Cody, offers significant benefits in addressing the needs of both your development team and your target market.&lt;/p&gt;

&lt;p&gt;This tutorial demonstrated how Cody can build a PoC app quickly and efficiently, from planning to execution, allowing you to focus on creating solutions that resonate with your target audience. To experience how Cody can enhance your development workflow, &lt;a href="https://sourcegraph.com/cody" rel="noopener noreferrer"&gt;sign up for free today&lt;/a&gt; and take your projects to the next level. Additionally, don’t miss the chance to connect with experienced developers, collaborate on exciting projects, and contribute to a &lt;a href="https://sourcegraph.com/community" rel="noopener noreferrer"&gt;growing community&lt;/a&gt; of innovators using Cody to build successful PoCs.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sourcegraph.com/docs/cody" rel="noopener noreferrer"&gt;Cody documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sourcegraph.com/blog/how-to-write-unit-tests" rel="noopener noreferrer"&gt;How to write unit tests&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>softwaredevelopment</category>
      <category>webdev</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Building scalable apps with serverless PostgreSQL &amp; Django</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Thu, 08 Feb 2024 07:19:22 +0000</pubDate>
      <link>https://dev.to/hackmamba/building-scalable-apps-with-serverless-postgresql-django-25pb</link>
      <guid>https://dev.to/hackmamba/building-scalable-apps-with-serverless-postgresql-django-25pb</guid>
      <description>&lt;p&gt;The developer ecosystem is seeing a &lt;a href="https://www.datadoghq.com/state-of-serverless/?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_id=HMBcommunity" rel="noopener noreferrer"&gt;surge&lt;/a&gt; in the use of serverless architectures for building modern applications.  Particularly noteworthy is the emergence of serverless PostgreSQL databases — a managed database service designed for serverless computing environments, offering automatic scaling, pay-as-you-go pricing, flexibility, and reduced operational overhead for developers.&lt;/p&gt;

&lt;p&gt;In this article, we’ll be taking a look at &lt;a href="https://neon.tech/?ref=hm" rel="noopener noreferrer"&gt;Neon&lt;/a&gt;, an open-source, fully managed serverless Postgres. On top of traditional Postgres, Neon offers a range of benefits, including &lt;a href="https://neon.tech/docs/introduction/autoscaling?ref=hm" rel="noopener noreferrer"&gt;autoscaling&lt;/a&gt; to match varying workloads and git-like &lt;a href="https://neon.tech/docs/introduction/branching?ref=hm" rel="noopener noreferrer"&gt;database&lt;/a&gt; &lt;a href="https://neon.tech/docs/introduction/branching" rel="noopener noreferrer"&gt;branching&lt;/a&gt;, which allows developers to create a writeable isolated version of their original data and schema.&lt;/p&gt;

&lt;p&gt;By the end of this tutorial, you'll have a solid understanding of how to use serverless PostgreSQL to create scalable and efficient solutions for modern web development, including building a to-do app with Neon's Postgres database and Django.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Github&lt;/strong&gt;&lt;br&gt;
Check out the complete source code &lt;a href="https://github.com/shosenwales/Neon-todo?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_id=HMBcommunity" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To follow along with this tutorial, you’ll need the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python &amp;gt;= 3.8.3&lt;/strong&gt; installed.&lt;/li&gt;
&lt;li&gt;A basic understanding of Python and Django.&lt;/li&gt;
&lt;li&gt;A Neon cloud account. Sign up &lt;a href="https://neon.tech/?ref=hm" rel="noopener noreferrer"&gt;here&lt;/a&gt;!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Creating a Neon project
&lt;/h2&gt;

&lt;p&gt;To create our first Neon project, complete the following steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign into your Neon account, after which you’ll be redirected to the Neon console.&lt;/li&gt;
&lt;li&gt;On the console, a project creation dialog will appear. This dialog allows us to specify the following:

&lt;ol&gt;
&lt;li&gt;project name&lt;/li&gt;
&lt;li&gt;Postgres version&lt;/li&gt;
&lt;li&gt;database name&lt;/li&gt;
&lt;li&gt;region
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpaper-attachments.dropboxusercontent.com%2Fs_5B1CC31AA2E2A0FE3BC570D7CFDAD2A7ADE0601EA113181739F88A0C5C2FDE01_1701363072397_neon%2Bdef.jpeg" alt="Creating a new project and database on Neon"&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After creating a project, we’ll be redirected to the Neon console, and a pop-up modal with a &lt;code&gt;connection string&lt;/code&gt; will appear. &lt;/p&gt;

&lt;p&gt;Neon also provides database connection settings for different programming languages and frameworks. We can retrieve the Django connection string by accessing the &lt;strong&gt;Connection Details&lt;/strong&gt; widget on the Neon Dashboard and choosing &lt;code&gt;Django&lt;/code&gt; from the dropdown menu.&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_5B1CC31AA2E2A0FE3BC570D7CFDAD2A7ADE0601EA113181739F88A0C5C2FDE01_1701363293175_neon%2Bconnect.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_5B1CC31AA2E2A0FE3BC570D7CFDAD2A7ADE0601EA113181739F88A0C5C2FDE01_1701363293175_neon%2Bconnect.png" alt="Neon database connection details"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Copy this database connection string to a safe location; we’ll need it later in the tutorial!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Scaffolding a Django app
&lt;/h2&gt;

&lt;p&gt;To start the process, let's create a new python virtual environment. This lets us use separate library installations for a project without installing them globally. &lt;/p&gt;

&lt;p&gt;Now, let’s create a virtual environment by running the command below:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The command above tells Python to create the virtual environment in a directory named &lt;code&gt;env&lt;/code&gt; in the current directory. On creation, we’ll activate the virtual environment using the following command:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source env/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;After activating the environment, install Django using the following command:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install django
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Next, we create a new Django project &lt;code&gt;django_neon&lt;/code&gt; using&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;django-admin startproject django_neon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Then, navigate to the &lt;code&gt;django_neon&lt;/code&gt; directory and create a &lt;code&gt;todos&lt;/code&gt; app:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd django_neon
django-admin startapp todos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Let’s add our app to the list of already installed apps. Including an application in the &lt;code&gt;INSTALLED_APPS&lt;/code&gt; list makes its functionality available to the project, allowing us to use its models, views, templates, and other components. &lt;/p&gt;

&lt;p&gt;In our editor, navigate to the &lt;code&gt;django_neon&lt;/code&gt; directory and edit the &lt;code&gt;settings.py&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;        &lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.admin&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.auth&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.contenttypes&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.sessions&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.messages&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.staticfiles&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;todos&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;#our newly installed app
&lt;/span&gt;    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Installing dependencies
&lt;/h2&gt;

&lt;p&gt;A few other things to take care of: we need to install &lt;a href="https://pypi.org/project/psycopg2/?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_id=HMBcommunity" rel="noopener noreferrer"&gt;psycopg2&lt;/a&gt;, a PostgreSQL adapter for Python, in our Django app. This will enable Django to connect to our PostgreSQL database and provide the functionality to execute SQL queries and commands from our Django application to the PostgreSQL database. &lt;/p&gt;

&lt;p&gt;To do so, run the following command in your terminal:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install psycopg2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Setting up Neon credentials
&lt;/h2&gt;

&lt;p&gt;To configure our application to use the Neon PostgreSQL database, we need to update our app's settings. Remember the Django connection settings we copied earlier? We’ll now update our &lt;code&gt;settings.py&lt;/code&gt; file with those:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;django_neon/settings.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;  &lt;span class="n"&gt;DATABASES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;default&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ENGINE&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.db.backends.postgresql&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;NAME&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tododb&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;USER&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;wales149&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;PASSWORD&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;YOUR_PASSWORD&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;HOST&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ep-purple-smoke-78175257.us-east-2.aws.neon.tech&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;PORT&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;5432&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;OPTIONS&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sslmode&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;require&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Keep in mind, while we’re putting the credentials directly into the file for simplicity here, a production app should keep sensitive information out of the codebase using environment variables. Check out this &lt;a href="https://djangocentral.com/environment-variables-in-django/?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_id=HMBcommunity" rel="noopener noreferrer"&gt;guide&lt;/a&gt; on creating environment variables in Django.&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating a model class
&lt;/h2&gt;

&lt;p&gt;Let’s update our &lt;code&gt;model.py&lt;/code&gt; file, one of Django's most important files that helps define our data structure. This file is added by default when a project is created.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;todos/model.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt; &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.db&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;

    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TextField&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the code snippet above, we:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;define a Django model named &lt;code&gt;Todo&lt;/code&gt;, which represents a to-do item in the application.&lt;/li&gt;
&lt;li&gt;create a new class named Todo that inherits from &lt;code&gt;models.Model&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;define a single field within the Todo model. The field is named &lt;code&gt;task&lt;/code&gt;, and it is of type &lt;code&gt;models.TextField()&lt;/code&gt;. This indicates that the task field will store text data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next, we need to migrate our model to the database. Do so by running the following command:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  python manage.py makemigrations   &lt;span class="c"&gt;#migrating the app and database changes&lt;/span&gt;
  python manage.py migrate          &lt;span class="c"&gt;#final migrations&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now, let’s confirm that our table and column have been created by selecting the &lt;code&gt;Tables&lt;/code&gt; section in the Neon &lt;a href="https://console.neon.tech/sign_in?ref=/?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_id=HMBcommunity" rel="noopener noreferrer"&gt;console&lt;/a&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%2Fpaper-attachments.dropboxusercontent.com%2Fs_5B1CC31AA2E2A0FE3BC570D7CFDAD2A7ADE0601EA113181739F88A0C5C2FDE01_1701365408852_Screenshot%2B2023-11-30%2B180855_2.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%2Fpaper-attachments.dropboxusercontent.com%2Fs_5B1CC31AA2E2A0FE3BC570D7CFDAD2A7ADE0601EA113181739F88A0C5C2FDE01_1701365408852_Screenshot%2B2023-11-30%2B180855_2.png" alt="Our newly created table"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating a view
&lt;/h2&gt;

&lt;p&gt;In our &lt;code&gt;views.py&lt;/code&gt; file, which handles user requests and rendering responses, let’s add the following code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;todos/view.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;redirect&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.http&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HttpResponse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;HttpRequest&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Todo&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;task_lists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;todo_list&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;Todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;todos/tasks.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;HttpRequest&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tasks&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
        &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/todos/list/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;delete_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;todo_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;task_to_delete&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;todo_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;task_to_delete&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/todos/list/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the code snippet above, we created three functions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;task_lists&lt;/code&gt;  renders a webpage that displays a list of to-do tasks. It queries all the tasks from the &lt;code&gt;Todo&lt;/code&gt; model and passes them to the &lt;code&gt;tasks.html&lt;/code&gt; template using the &lt;code&gt;render&lt;/code&gt; function.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;add_task&lt;/code&gt; adds a new task to the to-do list. It extracts the task from the POST request, creates a new Todo object, saves it to the database, and then redirects the user to the &lt;code&gt;/todos/list&lt;/code&gt; URL.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;delete_task&lt;/code&gt; deletes a task from the to-do list based on the &lt;code&gt;todo_id&lt;/code&gt;. It retrieves the corresponding Todo object from the database, deletes it, and redirects the user to the &lt;code&gt;/todos/list/&lt;/code&gt; URL.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Creating templates
&lt;/h2&gt;

&lt;p&gt;We start by creating a &lt;code&gt;templates&lt;/code&gt; directory in our todos directory. We create an &lt;code&gt;index.html&lt;/code&gt; file and add the following in our newly created directory:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;todos/templates/index.html&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;    &lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Neon App&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;integrity=&lt;/span&gt;&lt;span class="s"&gt;"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"&lt;/span&gt; &lt;span class="na"&gt;crossorigin=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css"&lt;/span&gt; &lt;span class="na"&gt;integrity=&lt;/span&gt;&lt;span class="s"&gt;"sha512-YWzhKL2whUzgiheMoBFwW8CKV4qpHQAEuvilg9FAn5VJUDwKZZxkJNuGM4XkWuk94WCrrwslk8yWNGmY1EduTA=="&lt;/span&gt; &lt;span class="na"&gt;crossorigin=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt; &lt;span class="na"&gt;referrerpolicy=&lt;/span&gt;&lt;span class="s"&gt;"no-referrer"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"background-color: #2e2e2e;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"row mt-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"col-md-8 offset-md-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card-header shadow-sm"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"background-color: #B10F49;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"display-5 text-info"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;i&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"fa-solid fa-list-check text-light"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;My List&lt;span class="nt"&gt;&amp;lt;/i&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card body"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"list-group"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"list-group-item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                    &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"{% url 'add_task' %}"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                        {% csrf_token %}
                                        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input-group"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-control"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"tasks"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input-group-append text-info"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                                &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input-group-text bg-white py-0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                                    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn btn-sm text-info"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                                        &lt;span class="nt"&gt;&amp;lt;i&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"fa-regular fa-square-plus fa-lg text-success"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/i&amp;gt;&lt;/span&gt;
                                                    &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
                                                &lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt; 
                                    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
                                {% for todo in todo_list %}
                                &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"list-group-item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;{{todo.task}}&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"{% url 'delete_task' todo.id %}"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"float-right d-inline"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                    {% csrf_token %}
                                    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;i&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"fa-solid fa-calendar-xmark text-danger float-right"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/i&amp;gt;&lt;/span&gt;
                                    &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
                                {% endfor %}
                            &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;


    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"&lt;/span&gt; &lt;span class="na"&gt;integrity=&lt;/span&gt;&lt;span class="s"&gt;"sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"&lt;/span&gt; &lt;span class="na"&gt;crossorigin=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the HTML snippet above, we did the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;display each task as a list item &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; within the list group&lt;/li&gt;
&lt;li&gt;use a for loop &lt;code&gt;{% for todo in todo_list %}&lt;/code&gt; to iterate over the tasks from the database and display them&lt;/li&gt;
&lt;li&gt;add a delete button for each task&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;{% url 'add_task' %}&lt;/code&gt; and &lt;code&gt;{% url 'delete_task' todo.id %}&lt;/code&gt; as placeholders that will be replaced with the actual URLs by Django during rendering&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let’s configure routing for our app by updating the &lt;code&gt;urls.py&lt;/code&gt; file in our &lt;code&gt;django_neon&lt;/code&gt; directory. This file helps define the URL patterns for our Django project.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include&lt;/span&gt;
    &lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;admin/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;todos/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;todos.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then, in our &lt;code&gt;**todos**&lt;/code&gt; directory, let’s create a separate &lt;code&gt;**urls.py**&lt;/code&gt; file, distinct from the default one. Add the following code to this new &lt;code&gt;**urls.py**&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; 
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;
    &lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;list/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task_lists&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;add_task/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;add_task&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;delete_task/&amp;lt;int:todo_id&amp;gt;/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delete_task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;delete_task&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Let’s test this out by starting the server with the following command:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Our application should look like this.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://app.opentape.io/share/b6c3fcc1-1d4f-4614-81a0-350cbdc21af2" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fapp.opentape.io%2Fthumbnail%2Fb6c3fcc1-1d4f-4614-81a0-350cbdc21af2" height="auto" class="m-0"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://app.opentape.io/share/b6c3fcc1-1d4f-4614-81a0-350cbdc21af2" rel="noopener noreferrer" class="c-link"&gt;
          Django Neon | Opentape
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Oseni Shuaib - Feb 7th, 4:37pm
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fapp.opentape.io%2Ffavicon.ico"&gt;
        app.opentape.io
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we demonstrated how to use Django backed by &lt;a href="https://neon.tech/?ref=hm" rel="noopener noreferrer"&gt;serverless Postgres&lt;/a&gt; (Neon) by building a simple todo application. We also went through the essential steps, from setting up the Django environment and defining models to seamlessly integrating Neon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://neon.tech/docs/introduction?ref=hm" rel="noopener noreferrer"&gt;Neon documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://neon.tech/docs/community/community-intro?ref=hm" rel="noopener noreferrer"&gt;Neon community&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>serverless</category>
      <category>neon</category>
      <category>django</category>
      <category>postgres</category>
    </item>
    <item>
      <title>How freelance developers can grow their businesses and increase revenue with Appwrite Cloud</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Thu, 17 Aug 2023 08:34:54 +0000</pubDate>
      <link>https://dev.to/hackmamba/how-freelance-developers-can-grow-their-businesses-and-increase-revenue-with-appwrite-cloud-2dnj</link>
      <guid>https://dev.to/hackmamba/how-freelance-developers-can-grow-their-businesses-and-increase-revenue-with-appwrite-cloud-2dnj</guid>
      <description>&lt;p&gt;The freelance industry is booming. Upwork and Freelancers Union's survey estimates that if current trends continue, by 2027 &lt;a href="https://www.forbes.com/sites/elainepofeldt/2017/10/17/are-we-ready-for-a-workforce-that-is-50-freelance/?sh=3a3d19c33f82"&gt;over 50% of the workforce will be freelancers&lt;/a&gt;. Several factors drive this growth, including the rise of the gig economy, the increasing popularity of remote work, and the growing demand for specialized skills.&lt;/p&gt;

&lt;p&gt;As the freelance industry continues to grow, so does the competition. Freelancers need to be more strategic than ever before to succeed. Two key factors that determine success are cost-saving measures and revenue growth. Freelancers who master these elements are well-positioned for success.&lt;/p&gt;

&lt;p&gt;Cost-saving allows freelancers to optimize budgets, allocate resources efficiently, and save money to invest in professional development and improve their quality of service. Revenue growth, on the other hand, is the lifeblood of freelancing, directly linked to satisfactory project completion and service fees. Freelancers can accelerate their businesses and maximize earning potential by delivering exceptional client value.&lt;/p&gt;

&lt;p&gt;This article explores how freelancers can grow their businesses and increase revenue, providing valuable insights into how to harness their potential for long-term success. It also discusses how they can leverage Appwrite Cloud to propel their businesses forward and thrive in the competitive freelance market.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the value of cost-saving and revenue growth for freelancers
&lt;/h2&gt;

&lt;p&gt;Cost-saving and revenue growth are two critical factors that play a significant role in the success of freelancing. In this section, we’ll be exploring these factors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost saving
&lt;/h2&gt;

&lt;p&gt;As a freelancer, you have complete control over your expenses, including software, hardware, and other business-related costs. Implementing cost-saving strategies within these tech areas is essential as it allows you to optimize your budget and allocate resources more effectively. &lt;/p&gt;

&lt;p&gt;Cost-saving measures reduce financial burdens and create opportunities for investing in professional development, marketing efforts, or enhancing the quality of your services. Embracing free or open-source software can save you substantial costs on licenses and subscriptions, enabling you to deliver high-quality work without sacrificing your budget. Additionally, combining subscriptions and streamlining your tools and resources can eliminate unnecessary expenses, freeing up resources for other essential business areas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Revenue growth
&lt;/h2&gt;

&lt;p&gt;In freelance work, revenue growth is directly tied to the number of projects you complete and the fees you charge for your services. Increasing your revenue is crucial for business growth and achieving your financial goals.&lt;/p&gt;

&lt;p&gt;Expanding your service offerings allows you to tap into new markets and attract more clients. By developing expertise in emerging trends and technologies, you position yourself as a valuable resource for clients seeking innovative solutions.&lt;/p&gt;

&lt;p&gt;Exploring opportunities to upsell your services to existing clients can significantly impact your revenue. Investing in your clients and predicting their future needs — and how your innovative services can provide solutions — is crucial to maintaining client loyalty and keeps them coming back for more. Understanding their evolving needs and offering additional value-added solutions can increase the average project value and generate extra income without acquiring new clients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Provide value to customers to grow revenue as a freelance developer
&lt;/h2&gt;

&lt;p&gt;Freelancers often lose clients due to failure with project delivery timelines. The pain of losing a hard-earned client can be enormous. As a freelance developer, one of the critical drivers of revenue growth is the ability to consistently provide value to your clients. To provide value, you need to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understand your client's need&lt;/strong&gt;&lt;br&gt;
To provide value, it's crucial to understand your customers' needs. What are they trying to achieve with your services? What are their pain points? Take the time to communicate with them and gather insights about their goals, challenges, and desired outcomes.&lt;/p&gt;

&lt;p&gt;Understanding their needs allows you to tailor your solutions to address their pain points and deliver outcomes that align with their goals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deliver high-quality work&lt;/strong&gt;&lt;br&gt;
This is the most essential factor in providing value to your clients. If you deliver high-quality work and your clients receive exceptional results, they are more likely to be satisfied, refer you to others, and engage your services for future projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go above and beyond&lt;/strong&gt;&lt;br&gt;
Don't just do what's expected of you. Differentiate yourself from the competition by going the extra mile to exceed your client's expectations. This can include offering additional features or functionality that enhance the usability or effectiveness of the project. &lt;/p&gt;

&lt;p&gt;Additionally, being responsive, proactive, and maintaining clear communication throughout the project lifecycle can help build trust and demonstrate your commitment to customer satisfaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Allocate time to high-value activities for financial success as a freelance developer
&lt;/h2&gt;

&lt;p&gt;By identifying the activities that generate the most revenue and focusing your efforts on them, you can optimize your productivity, maximize your earning potential, and drive your freelance business forward. &lt;br&gt;
Here are some strategies to help you allocate your time effectively:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Utilizing open-source so&lt;/strong&gt;&lt;strong&gt;lution&lt;/strong&gt;&lt;strong&gt;s&lt;/strong&gt;&lt;br&gt;
Several open-source solutions can be used to build mobile/web applications. Leveraging open-source software packages can significantly reduce development costs and allow you to allocate more time and resources to high-value activities.&lt;/p&gt;

&lt;p&gt;Utilizing these cost-effective solutions can save you money on development expenses while still delivering high-quality client results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find a reliable development partner&lt;/strong&gt;&lt;br&gt;
If you lack the necessary skills or resources to handle all aspects of app development, consider finding a reliable development partner to collaborate with. This can be a cost-effective approach to building your app while allowing you to focus on your core competencies. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outsource non-core tasks&lt;/strong&gt;&lt;br&gt;
Building a mobile or web app involves various non-core tasks that may not be the best use of your time as a freelance developer. Consider outsourcing these non-core activities to third-party experts or freelancers specializing in those areas. Typical tasks to outsource may include content creation or UI/UX.&lt;/p&gt;

&lt;h1&gt;
  
  
  Invest in the right platform to set your freelance business on the path to success
&lt;/h1&gt;

&lt;p&gt;When choosing a development platform for your freelance business, it is important to keep a few things in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reliability and scalability:&lt;/strong&gt; First, ensure that the platform you choose is reliable and can handle the demands of your business. Look for a platform with a proven track record, robust infrastructure, and minimal downtime. Scalability is also important, as it should have the ability to grow with your business and handle increasing client demands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Essential features:&lt;/strong&gt; Second, check if the platform provides the features and functionalities you need for your freelance projects. Consider the specific needs of your clients and projects. Look for features like authentication, file storage, and APIs that can streamline development and support your application requirements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Exploring Appwrite Cloud's cost-saving features for freelancers
&lt;/h1&gt;

&lt;p&gt;Appwrite believes that developers should have access to powerful tools and services that are intuitive, developer-centric, and affordable. With &lt;a href="https://appwrite.io/public-beta?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite Cloud&lt;/a&gt;, Appwrite is extending its commitment to provide developers with the best possible experience by offering a fully managed backend solution that simplifies infrastructure management and helps them focus on what they do best — building great applications!&lt;/p&gt;

&lt;p&gt;An open-source platform like Appwrite helps developers abstract the complexity of common and repetitive tasks required to build a modern app, helping them invest their time more efficiently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cloud.appwrite.io/login?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite Cloud&lt;/a&gt; offers a range of cost-saving features that benefit freelance developers. By taking advantage of these features, freelancers can streamline their app development process, deliver projects quickly, and maximize their profits:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy app development&lt;/strong&gt;&lt;br&gt;
Appwrite Cloud simplifies app development by providing a comprehensive backend server with pre-built functionalities. Instead of spending valuable time and resources building complex infrastructure from scratch, you can leverage Appwrite's ready-to-use &lt;a href="https://appwrite.io/docs/rest?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;APIs&lt;/a&gt; and &lt;a href="https://appwrite.io/docs/sdks?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;SDKs&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This eliminates the need for extensive backend development work, reducing development time and resource costs, and allowing you to prioritize high-value activities and core tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instant app delivery&lt;/strong&gt;&lt;br&gt;
With Appwrite Cloud, you can accelerate your app delivery process. The platform offers an auto-scalable infrastructure that ensures apps can handle increased user traffic seamlessly. You no longer need to invest in and manage your servers, as Appwrite oversees the infrastructure for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cos&lt;/strong&gt;&lt;strong&gt;t&lt;/strong&gt;&lt;strong&gt;-effective database management&lt;/strong&gt;&lt;br&gt;
Appwrite Cloud provides a powerful &lt;a href="https://appwrite.io/docs/server/databases?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;database&lt;/a&gt; management system as part of its features. You can efficiently store and manage app data as a freelancer without needing separate database services. This integrated database feature eliminates the cost of maintaining and managing standalone databases, reducing overall expenses and complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data protection and security&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://appwrite.io/policy/security?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Security&lt;/a&gt; and data protection are essential when handling sensitive client information. Appwrite Cloud offers robust built-in security measures, including end-to-end encryption, secure user authentication, and role-based access control. &lt;/p&gt;

&lt;p&gt;By leveraging these features, freelancers can ensure the safety and privacy of user data without incurring additional costs for implementing and maintaining security protocols.&lt;/p&gt;

&lt;h1&gt;
  
  
  Tapping into Appwrite's developer network for support
&lt;/h1&gt;

&lt;p&gt;As a freelance developer, you may encounter problems or have specific questions during your building phase. Hence, it is vital to ensure that an active and helpful developer community is available to you. Appwrite offers a &lt;a href="https://discord.com/invite/appwrite?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;vibrant developer network&lt;/a&gt; that provides a range of benefits: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem-solving and knowledge sharing:&lt;/strong&gt; Being part of Appwrite's developer network grants freelancers access to a diverse community of experienced developers. You can leverage this network to seek advice and solutions when facing challenges or encountering technical issues. Additionally, you can tap into a wealth of knowledge and expertise through community forums, chat groups, and discussion boards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration and opportunities:&lt;/strong&gt; Appwrite's developer network is a platform for collaboration and networking. You can connect with other developers, exchange ideas, and explore potential partnerships. Collaborating with other talented professionals can lead to joint projects, resource sharing, and expanding service offerings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill development:&lt;/strong&gt; Appwrite's developer community serves as a valuable resource for learning and skill development, allowing you to benefit from the expertise and insights shared by other community members. By actively participating in discussions, attending webinars or virtual meetups, and engaging in collaborative projects, freelancers can expand their knowledge base, learn new technologies, and stay updated with the latest industry trends.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;By implementing cost-saving strategies to grow revenue, freelancers can achieve long-term success. Appwrite Cloud is a powerful platform that can help freelancers achieve their goals. With its range of cost-saving features and developer-friendly tools, Appwrite Cloud can help freelancers streamline their app development process, deliver projects quickly, enhance customer value, and maximize their profits.&lt;/p&gt;

&lt;p&gt;If you are a freelance developer looking to grow your business, we encourage you to &lt;a href="https://cloud.appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;sign up on Appwrite Cloud&lt;/a&gt;. With its affordable pricing, robust features, and active developer community, Appwrite Cloud is the best platform to help you succeed in the freelance market.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hackmamba/breaking-through-growth-barriers-how-appwrites-cloud-enables-scalability-1f57"&gt;How Appwrite Cloud Enables Scalability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hackmamba/scalability-what-every-business-using-the-cloud-needs-to-know-54ci"&gt;Scalability: What every business using the cloud needs to know&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>backend</category>
      <category>cloud</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Cloud Hosting or Self-Hosting: A Fresh Perspective</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Tue, 18 Apr 2023 04:09:48 +0000</pubDate>
      <link>https://dev.to/hackmamba/cloud-hosting-or-self-hosting-a-fresh-perspective-31nf</link>
      <guid>https://dev.to/hackmamba/cloud-hosting-or-self-hosting-a-fresh-perspective-31nf</guid>
      <description>&lt;p&gt;When it comes to web or mobile applications, choosing between cloud hosting and self-hosting can be a daunting task. Cloud hosting involves outsourcing to a third-party provider, while self-hosting involves managing a server in-house&lt;/p&gt;

&lt;p&gt;Both have their unique advantages and disadvantages, leaving businesses and individuals in a constant state of indecisiveness. This article will examine both options, including their pros and cons.&lt;/p&gt;

&lt;h1&gt;
  
  
  Defining Cloud Hosting and Self-Hosting
&lt;/h1&gt;

&lt;p&gt;Cloud hosting and self-hosting are two methods of hosting websites, applications, and other online services. &lt;a href="https://www.ibm.com/cloud/learn/what-is-cloud-hosting"&gt;Cloud&lt;/a&gt; &lt;a href="https://www.ibm.com/cloud/learn/what-is-cloud-hosting"&gt;hosting&lt;/a&gt; refers to hosting websites or applications on servers that a third-party cloud service provider provides. These providers offer various services, including storage, computing resources, and networking infrastructure. Users can access these services remotely and are charged based on usage.&lt;/p&gt;

&lt;p&gt;On the other hand, &lt;a href="https://www.openproject.org/blog/why-self-hosting-software/"&gt;self-hosting&lt;/a&gt; is where websites or applications are hosted on servers owned and managed by the user. In this case, the user has complete control over the hardware and software used to host the services. However, this approach requires the user to set up the necessary infrastructure, including servers, network connections, and security measures.&lt;/p&gt;

&lt;h1&gt;
  
  
  Comparison of Cloud Hosting and Self-Hosting
&lt;/h1&gt;

&lt;p&gt;Both cloud hosting and self-hosting have their advantages and disadvantages. Organizations should carefully evaluate their needs and resources before deciding which hosting method to use.&lt;/p&gt;

&lt;p&gt;Here are some of the key factors to consider when comparing these two hosting methods:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Cloud Hosting&lt;/th&gt;
&lt;th&gt;Self-Hosting&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scalability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud hosting is highly scalable; allowing users to quickly and easily increase or decrease their resources.&lt;/td&gt;
&lt;td&gt;Self-hosting can be more challenging to scale as it requires users to invest in additional hardware and infrastructure to support growth.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Control&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;With cloud hosting, users have less control over the underlying infrastructure and may need to rely on the service provider for certain tasks.&lt;/td&gt;
&lt;td&gt;Self-hosting provides users with more control over their infrastructure and resources. Users can choose the specific hardware and software they use and they have complete control over the configuration and management of their servers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Users rely on cloud provider's security measures.&lt;/td&gt;
&lt;td&gt;With self-hosting, security can be more challenging as it requires more effort and investment.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reliability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud hosting providers typically offer high levels of reliability and uptime. They have redundancy measures to ensure services remain available even if one server or data center experiences issues.&lt;/td&gt;
&lt;td&gt;Self-hosting can be less reliable particularly for users who don't have the resources to invest in redundancy measures.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backup and Recovery&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;This is typically included in the service.&lt;/td&gt;
&lt;td&gt;The organization needs to set up its backup plan.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud hosting is generally more cost-effective. Cloud service providers can offer economies of scale to provide services at a lower cost.&lt;/td&gt;
&lt;td&gt;Self-hosting requires upfront hardware and software costs.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  Pros and Cons of Cloud Hosting
&lt;/h1&gt;

&lt;p&gt;While cloud hosting offer quite a few positives like greater flexibility and scalability, there are still some cons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easy Management:&lt;/strong&gt; Cloud hosting providers typically offer easy-to-use control panels and automated updates, making server management more accessible to non-technical users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible Pricing:&lt;/strong&gt; With cloud hosting, you only pay for the resources you use; making it a more cost-effective option for websites or applications with varying traffic levels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Availability:&lt;/strong&gt; Cloud hosting providers typically have redundant servers and failover systems to ensure high availability and minimal downtime.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cons:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited Control:&lt;/strong&gt; With cloud hosting, you have limited control over the hardware and software used to host your website or application, which can be a disadvantage if you require specific configurations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependence on Provider:&lt;/strong&gt; With cloud hosting, you depend on your hosting provider to ensure your website or application is available and secure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; While cloud hosting providers typically offer high levels of security, there is still the risk of data breaches or cyber-attacks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Pros and Cons of Self-Hosting
&lt;/h1&gt;

&lt;p&gt;Despite self-hosting's convenience and flexibility, it also has some drawbacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Complete Control:&lt;/strong&gt; Self-hosting gives you full control over your website or application including customization of the hardware and software to your needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Increased Security:&lt;/strong&gt; With self-hosting, you have complete control over your website or application's security and can implement security measures to protect your data and users.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cons:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Technical&lt;/strong&gt; &lt;strong&gt;E&lt;/strong&gt;&lt;strong&gt;xpertise Required:&lt;/strong&gt; Managing your server requires technical expertise which can be a challenge if you don't have experience in server management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Redundancy:&lt;/strong&gt; If your server goes down, your website or application will be inaccessible until you resolve the issue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time&lt;/strong&gt; &lt;strong&gt;I&lt;/strong&gt;&lt;strong&gt;nvestment:&lt;/strong&gt; Self-hosting requires ongoing maintenance and updates which can take a significant amount of time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  A Fresh Perspective: Appwrite Cloud's Private Beta, the Perfect Fit
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite&lt;/a&gt; is an open-source Backend-as-a-Service (BaaS) platform that simplifies the backend development process; offering developers an easy-to-use API and the flexibility to customize their backend infrastructure. It is platform-agnostic (runs on any operating system) and supports web and mobile technologies and frameworks such as Flutter, Angular, and React.&lt;/p&gt;

&lt;p&gt;By utilizing the &lt;a href="https://appwrite.io/cloud/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite cloud&lt;/a&gt; service, developers can focus on building applications without worrying about the headaches of self-hosting, like server maintenance and updates. Some of the benefits of Appwrite cloud include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost-&lt;/strong&gt;&lt;strong&gt;E&lt;/strong&gt;&lt;strong&gt;ffective:&lt;/strong&gt; With Appwrite, you only pay for the resources you use, making it an affordable option for businesses of all sizes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in-Security:&lt;/strong&gt; Appwrite is built with security in mind by offering features like DDoS protection, data encryption, multi-factor authentication, layers of firewall, and other features to keep your data safe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto Scaling:&lt;/strong&gt; Appwrite cloud provides greater scalability, enabling developers to handle increasing traffic without manual intervention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community:&lt;/strong&gt; With Appwrite, you'll have access to a community of developers using Appwrite to build scalable and efficient applications. This community often serves as a resource for learning, a platform to share ideas, and get feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just a few benefits of using Appwrite Cloud. &lt;/p&gt;

&lt;p&gt;Overall, Appwrite cloud service is an open-source solution that enables fast and secure application development. This service is currently in the private beta stage, but you can get access by signing up &lt;a href="https://appwrite.io/cloud"&gt;here&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;In conclusion, choosing between cloud hosting and self-hosting depends on various factors such as cost, technical expertise, security concerns, and scalability requirements. &lt;/p&gt;

&lt;p&gt;Ultimately, the choice between cloud hosting and self-hosting should be based on a thorough evaluation of the specific needs and requirements of the business, as well as the potential risks and benefits associated with each hosting option.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;Appwrite Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/private-beta?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;Appwrite Private Beta&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>cloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Top 5 JavaScript tools for Ecommerce Platforms</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Tue, 07 Mar 2023 08:25:13 +0000</pubDate>
      <link>https://dev.to/shosenwales/top-5-javascript-tools-for-ecommerce-platforms-59nb</link>
      <guid>https://dev.to/shosenwales/top-5-javascript-tools-for-ecommerce-platforms-59nb</guid>
      <description>&lt;p&gt;Ecommerce platforms are online systems that allow businesses to sell products and services to customers over the internet. Ecommerce platforms have grown in popularity in recent years as more and more people shop online. By 2023, online retail sales will reach $6.51 trillion, adding 22% to all retail sales, according to research by &lt;a href="https://www.statista.com/statistics/1095969/retail-sales-by-channel-worldwide/" rel="noopener noreferrer"&gt;eMarketer and Statista&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;JavaScript (JS) is a programming language widely used in developing ecommerce platforms. It allows developers to create interactive and dynamic websites. In addition to client-side development, JS can also be applied to the server side using technologies such as Node.js, enabling developers to use the same language both on the frontend and backend of web applications.&lt;/p&gt;

&lt;p&gt;This article will walk you through the perks of using JavaScript in ecommerce and highlight five (5) top JavaScript tools for ecommerce.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Advantages of Using JavaScript in Ecommerce&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Improved User Interaction: User &lt;a href="https://medusajs.com/blog/9-best-ecommerce-ux-practices-with-examples/" rel="noopener noreferrer"&gt;experience&lt;/a&gt; is crucial for any online store, as it often influences user retention. JavaScript enables you to create responsive forms, which adjust to various screen sizes and resolutions. This keeps users on board as they fill out forms during purchases, improving their experience.&lt;/li&gt;
&lt;li&gt;Enhanced Performance: The loading time of a website affects its user experience and search engine optimization (SEO). According to &lt;a href="https://neilpatel.com/blog/loading-time/" rel="noopener noreferrer"&gt;research&lt;/a&gt;, 47% of users expect a website to load in no more than two seconds. JavaScript allows you to load content simultaneously, which can help improve the performance of ecommerce sites and reduce page load time.&lt;/li&gt;
&lt;li&gt;User Personalization: JavaScript allows you to personalize content and products based on a user's search history, browsing history, and other factors. This can improve the product's relevance to the user and increase the likelihood of conversion.&lt;/li&gt;
&lt;li&gt;Cross-platform support: With JavaScript, businesses can create ecommerce websites that will work on any major web browser, allowing you to reach a broad audience. It can also be used to develop the backend for ecommerce platforms, web storefronts, and mobile applications. This versatility makes it a popular choice among developers, allowing them to use the same language across different platforms and enhancing the overall development experience.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Below is a list of five tools that can be highly beneficial for different aspects of an ecommerce platform. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Node.js Ecommerce Backend: Medusa&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.medusajs.com/quickstart/quick-start/" rel="noopener noreferrer"&gt;Medusa&lt;/a&gt; is an open source composable commerce platform built on Node.js with which developers can build custom ecommerce applications. Medusa is an ecommerce platform that provides a robust set of features for managing orders, exchanges, returns, customers, customer groups, products, collections, regions, prices, taxes, sales channels and more. &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%2Fym9srlyb42wr4iqd2whx.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%2Fym9srlyb42wr4iqd2whx.png" alt="medusa"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Medusa, businesses can easily configure and manage multiple regions and currencies, integrate with various fulfillment providers, payment providers, and other third-party services using its plugin system, and use advanced pricing strategies with conditions based on the amount in the cart or promotions and discounts. &lt;/p&gt;

&lt;p&gt;Medusa also offers powerful import and export tools for bulk importing and exporting different entities such as products and orders, making it a versatile and flexible solution for businesses of all sizes.&lt;/p&gt;

&lt;p&gt;Medusa uses a decoupled architecture, meaning the backend is separated from the frontend. Developers can build the storefront with any frontend framework, such as Next.js, or a static site generator like Gatsby. &lt;a href="https://docs.medusajs.com/introduction/#architecture" rel="noopener noreferrer"&gt;Here's&lt;/a&gt; more information about Medusa architecture.&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%2F4t320r871e2f9vkadg0p.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%2F4t320r871e2f9vkadg0p.png" alt="medusa architecture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Medusa is divided into three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Medusa Server: This is the backbone of &lt;a href="https://docs.medusajs.com/quickstart/quick-start/" rel="noopener noreferrer"&gt;Medusa&lt;/a&gt;. It comes with ecommerce functionalities such as user management, cart, payment, and many more.&lt;/li&gt;
&lt;li&gt;Admin Dashboard: An &lt;a href="https://docs.medusajs.com/admin/quickstart/" rel="noopener noreferrer"&gt;admin&lt;/a&gt; panel that allows merchants to manage their stores. This also offers functionalities such as discounts and order management across regions.&lt;/li&gt;
&lt;li&gt;Storefront: This is the frontend of the ecommerce store, which comes with features such as product listing, checkout, and customer login. Medusa offers two prebuilt storefronts: &lt;a href="https://docs.medusajs.com/starters/nextjs-medusa-starter/" rel="noopener noreferrer"&gt;Next&lt;/a&gt; and &lt;a href="https://docs.medusajs.com/starters/gatsby-medusa-starter/" rel="noopener noreferrer"&gt;Gatsby&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Benefits of Using Medusa for Ecommerce&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Flexibility: It can be integrated with third-party payment systems like PayPal and Stripe, content management systems like Contentful and Strapi, and storage services like Amazon S3. A list of Medusa integrations can be found &lt;a href="https://www.notion.so/1a0ada9903874e0185d0b8ce0591b359" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Customization: Medusa is highly customizable, making it a powerful solution for a wide range of ecommerce platforms. Its plugin system allows developers to easily add or extend new features, allowing for a tailored and unique experience for each platform.&lt;/li&gt;
&lt;li&gt;Community: Medusa is an open source ecommerce solution supported by the community. With over 16k stars on &lt;a href="https://github.com/medusajs/medusa" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, Medusa has an active open source community of developers eagerly working to improve the solution.&lt;/li&gt;
&lt;li&gt;Performance: Medusa is based on Node.js, known for its high performance and low latency. You get out-of-the-box performance features, including page speed and SEO, with Medusa.&lt;/li&gt;
&lt;li&gt;Scalability: It is a highly scalable tool, allowing for easy expansion and growth as your ecommerce platform increases in size and complexity. You can easily handle increased traffic and data storage needs without worrying about performance issues or system crashes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Static Site Generator: Gatsby&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.gatsbyjs.com/docs/" rel="noopener noreferrer"&gt;Gatsby&lt;/a&gt; is a static site generator and a modern web framework based on React.js. It is used to build fast, efficient websites, and web applications. Static site generation preloads the entire website at build time, resulting in faster load times and better performance.&lt;/p&gt;

&lt;p&gt;In addition to using GraphQL, Gatsby allows developers to easily fetch and manipulate data from different sources, such as headless CMS, APIs, and databases.&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%2Fvucxgw06m9dwxz0rhnf9.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%2Fvucxgw06m9dwxz0rhnf9.png" alt="Gatsby"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Benefits of Using Gatsby for Ecommerce&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Flexibility: With Gatsby, developers can customize the appearance and feel of ecommerce sites and even add interactive features like user reviews and product filtering.&lt;/li&gt;
&lt;li&gt;Speed and Performance: As stated earlier, an ecommerce site's load time is vital. With Gatsby, websites are pre-rendered, which results in faster load times and improved performance. This is important for ecommerce websites, as customers are more likely to only return to websites that load quickly.&lt;/li&gt;
&lt;li&gt;It is SEO Friendly: SEO helps ecommerce websites increase brand visibility, which leads to more customer visits and revenue increase. Gatsby websites are pre-rendered, which makes them easily crawlable by search engines. It helps ecommerce businesses to be be easily found by customers through search.&lt;/li&gt;
&lt;li&gt;PWA support: Progressive Web Applications (PWAs) are web apps that can be installed on the user's device and work offline. By default, Gatsby websites are PWAs, which means that ecommerce websites can provide consumers with a more app-like experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Automated Testing: Nightwatch.js&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://nightwatchjs.org/guide/overview/what-is-nightwatch.html" rel="noopener noreferrer"&gt;Nightwatch.js&lt;/a&gt; is a Node.js-based automated testing framework used to test web applications. It allows developers to create automated tests that simulate user interactions, such as filling out forms and submitting data.&lt;/p&gt;

&lt;p&gt;With Nightwatch.js, developers can write tests that can be used to test the functionality of web applications and their performance and usability across different browsers. This allows developers to focus on writing code while ensuring that their application works as expected.&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%2Fc1i26kz7vydq24d2r9e0.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%2Fc1i26kz7vydq24d2r9e0.png" alt="Nightwatch js"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Benefits of Using Nightwatch for Ecommerce&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;End-to-End Testing: Nightwatch.js makes it possible to test every aspect of an ecommerce website, from when a user clicks on a link to when they complete their purchase.&lt;/li&gt;
&lt;li&gt;CI/CD Integration: Nightwatch.js is an open source project that can be integrated with continuous integration and continuous delivery tools such as Jenkins, Travis CI, and CircleCI. Applications can be automatically tested when code changes are pushed and deployed when all tests pass.&lt;/li&gt;
&lt;li&gt;Cross-Browser Support: Nightwatch.js allows developers to test their ecommerce websites on multiple browsers, including Chrome, Firefox and Safari. This allows them to ensure that their site works as expected across all platforms.&lt;/li&gt;
&lt;li&gt;Growth Potential: As an ecommerce website traffic grows, it is essential to maintain a satisfying user experience. As an ecommerce website grows, Nightwatch.js can be used to scale up testing and create a wide range of tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. JavaScript Monitoring: LogRocket&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.logrocket.com/docs" rel="noopener noreferrer"&gt;Logrocket&lt;/a&gt; is a Javascript monitoring tool for monitoring performance metrics in real-time and tracking user experience in web applications. Per LogRocket's website, "LogRocket combines session replay, error tracking, and product analytics – empowering software teams to create the ideal web and mobile product experience."&lt;/p&gt;

&lt;p&gt;LogRocket works by instrumenting a web application's JavaScript code and collecting data about user interactions, browser events, and network requests. After the data is collected, the LogRocket dashboard allows developers to view and analyze it in various ways.&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%2F6vvuakbwnu8nchgy1cf9.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%2F6vvuakbwnu8nchgy1cf9.png" alt="LogRocket"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Benefits of Using LogRocket for Ecommerce&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Real-Time Monitoring: Identifying and resolving issues as they occur helps improve the user experience of an ecommerce website. LogRocket alerts you whenever an issue occurs. It includes an explanation, links to the impacted page and a list of possible affected users. It also sends notifications via the dashboard, email, and any other integrated tool such as Slack.&lt;/li&gt;
&lt;li&gt;User Analytics: Understanding how users interact with your ecommerce websites is good for business. Logrocket allows you to analyze users' behaviour and get better insight through its session replay feature. Developers can watch a recording of user sessions, such as clicks, scrolls, and form submissions, which can be highly useful for resolving usability and bug-related issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. Live Chat: Zendesk Chat&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.zendesk.com/marketplace/" rel="noopener noreferrer"&gt;Zendesk Chat&lt;/a&gt; is a live chat software that allows businesses to provide real-time customer support to their website visitors. This enables businesses to communicate with their customers in real time through a chat widget on their website. This way, companies can provide quick and convenient support, address customer questions and concerns, and help to increase customer satisfaction and conversion rates. In addition, it allows businesses to provide timely and practical assistance to their customers in a personalized and conversational manner.&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%2F4jcdcgoo7v61rbhldzjc.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%2F4jcdcgoo7v61rbhldzjc.png" alt="Zendesk Chat"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Benefits of Using Zendesk Chat for Ecommerce&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Improved &lt;a href="https://medusajs.com/blog/13-live-chat-widgets-for-ecommerce-stores-in-2023/" rel="noopener noreferrer"&gt;Customer Engagement&lt;/a&gt;: Zendesk Chat allows ecommerce businesses to engage with customers in real time. It builds stronger relationships, which increases customer loyalty.&lt;/li&gt;
&lt;li&gt;Reduced Support Costs: Live chat is a low-cost means of providing real-time customer support to ecommerce businesses. It is a more effective way to resolve issues compared to phone or email support, which could be time-wasting and require multiple steps, delays, and transfers to reach an agent.&lt;/li&gt;
&lt;li&gt;Integration: Zendesk Chat can be integrated with other tools, such as CRM and ecommerce platforms, which allows ecommerce businesses to access customer data and order information in real time, improving the efficiency of the support process.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Using JavaScript tools in any ecommerce project is essential for creating a fast, efficient, and user-friendly website. The top 5 JavaScript tools for ecommerce platforms introduced in this blog post are Medusa, Gatsby.js, Nightwatch.js, LogRocket, and Zendesk Chat. They have unique features and benefits intended to improve ecommerce platform performance, conversions, and user experience. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.medusajs.com/usage/create-medusa-app" rel="noopener noreferrer"&gt;Medusa&lt;/a&gt; is a highly customizable composable ecommerce platform. With Medusa, you can build a scalable JavaScript ecommerce platform with a fast development process.&lt;/p&gt;

&lt;p&gt;You are welcome to contact the Medusa team via &lt;a href="https://discord.com/invite/F87eGuwkTp" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; if you have any issues or questions related to Medusa.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>ecommerce</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Choose a Data Storage Solution for your Company</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Mon, 20 Feb 2023 11:43:54 +0000</pubDate>
      <link>https://dev.to/hackmamba/how-to-choose-a-data-storage-solution-for-your-company-jj2</link>
      <guid>https://dev.to/hackmamba/how-to-choose-a-data-storage-solution-for-your-company-jj2</guid>
      <description>&lt;p&gt;With the growth of digital data and the rising necessity of data-driven decision-making, companies face the challenge of efficiently storing and managing their data. The data storage industry has seen vital developments, such as the rise of cloud storage, the growth of big data, and the increasing demand for real-time data analytics.&lt;/p&gt;

&lt;p&gt;While choosing the proper data storage solution can be daunting, it is essential to ensure that your company's data is protected and easily accessible.&lt;/p&gt;

&lt;p&gt;This post will discuss choosing the best data storage solution for your company.&lt;/p&gt;

&lt;h1&gt;
  
  
  Choosing a Data Storage: Factors to Consider
&lt;/h1&gt;

&lt;p&gt;Here are some key factors to consider before selecting a data storage solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data growth and scalability&lt;/li&gt;
&lt;li&gt;Data security and compliance&lt;/li&gt;
&lt;li&gt;Performance and access speed&lt;/li&gt;
&lt;li&gt;Cost and budget constraints&lt;/li&gt;
&lt;li&gt;Integration with existing systems and platforms
## Data Growth and Scalability &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a business, the amount of data your company collects, stores, and processes is expected to grow over time. Having a data storage solution that can handle the amount of data you have now and in the future is essential.&lt;/p&gt;

&lt;p&gt;When choosing a data storage solution, it's essential to consider the data growth and stability of the system. You want a scalable solution that can handle large amounts of data and a stable solution that can maintain performance during peak usage times. This ensures that your company's data is easily accessible and your business continues to operate without interruption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Security and Compliance
&lt;/h2&gt;

&lt;p&gt;Security is a crucial aspect to consider when choosing a data storage solution for your company. It is vital to ensure that you use a data storage solution with robust encryption and authentication measures to protect against unauthorized access. &lt;/p&gt;

&lt;p&gt;Compliance is also an important aspect to consider when choosing a data storage solution. Depending on the industry and region that your organization falls under, there are specific regulations regarding data storage you have to comply with, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Health Insurance Portability and Accountability Act &lt;a href="https://www.hhs.gov/hipaa/for-professionals/security/laws-regulations/index.html"&gt;(HIPAA)&lt;/a&gt; for healthcare &lt;/li&gt;
&lt;li&gt;General Data Protection Regulation &lt;a href="https://europa.eu/youreurope/business/dealing-with-customers/data-protection/data-protection-gdpr/index_en.htm"&gt;(GDPR)&lt;/a&gt; for companies operating in the European Union&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's essential to ensure that the data storage solution complies with relevant regulations to avoid penalties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance and Access Speed
&lt;/h2&gt;

&lt;p&gt;Performance and access speed are critical as they can significantly impact the overall performance of an application and the user experience. Users should be able to access the information they need quickly.&lt;/p&gt;

&lt;p&gt;When choosing a data storage solution, it is essential to consider a solution that allows for fast access to data; this will ensure that your user's data is easily accessible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost and Budget Constraints
&lt;/h2&gt;

&lt;p&gt;Budget constraints also play a crucial role in choosing a data storage solution. Companies may have a limited budget and need to consider the most cost-effective option that fits their needs. The cost of data storage can be a significant expense for any business, so it's important to choose a solution that fits within the budget constraints while still providing the necessary functionality.&lt;/p&gt;

&lt;p&gt;When choosing a data storage solution, consider using a cloud solution that is more cost effective than traditional on-premises storage solutions. Cloud storage providers typically offer a pay-as-you-go pricing model, which allows you to only pay for the storage you use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integration with Existing Systems and Platforms
&lt;/h2&gt;

&lt;p&gt;It's essential to consider the level of integration a solution offers with existing systems and platforms; selecting a solution that can integrate with existing systems and platforms will ensure that data can flow seamlessly between them is crucial.&lt;/p&gt;

&lt;h1&gt;
  
  
  Assessing your Storage Needs
&lt;/h1&gt;

&lt;p&gt;When choosing a data storage solution for your company, it is vital to assess your storage needs. This includes identifying the types of data your company needs to store, determining the volume of data that needs to be stored, and evaluating the performance and scalability requirements.&lt;/p&gt;

&lt;p&gt;List the specific needs and requirements of your company. This includes understanding the types of data your company needs to store, the volume of data that needs to be stored, and the specific storage requirements.&lt;/p&gt;

&lt;p&gt;When assessing your storage needs, ensure to also take into consideration the available storage types. Several storage solutions are available, such as on-premise and cloud storage. Each storage type has advantages and limitations, and choosing one that aligns with your company's needs and requirements is essential. It is important to be aware of the boundaries of the available storage types, such as cost, scalability, and accessibility.&lt;/p&gt;

&lt;h1&gt;
  
  
  Choosing the Right Solution
&lt;/h1&gt;

&lt;p&gt;It can be challenging to decide when presented with too many options. To make it easier, I have evaluated multiple data storage solutions, and &lt;strong&gt;Appwrite&lt;/strong&gt; is one solution that checks all the boxes. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is Appwrite?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite&lt;/a&gt; is a &lt;em&gt;self-hosted&lt;/em&gt; open-source BaaS (&lt;em&gt;backend-as-a-service)&lt;/em&gt; tool with which developers can build complete web and mobile applications without a custom backend server via a set of APIs and a management console UI.&lt;/p&gt;

&lt;p&gt;It is platform-agnostic (runs on any operating system) and supports web and mobile technologies and frameworks such as Flutter, Angular, and React. Appwrite also provides additional functionalities like analytics, localization, and notifications which are commonly required for many applications.&lt;/p&gt;

&lt;p&gt;Appwrite is designed to make it easier for developers to add standard application functionality without writing the code to handle it themselves. It abstracts away the complexities of working with different services and allows developers to focus on building their application logic.&lt;/p&gt;

&lt;p&gt;Some of the key features of Appwrite include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Storage:&lt;/strong&gt; With the Appwrite &lt;a href="https://appwrite.io/docs/server/storage"&gt;storage&lt;/a&gt; service, you can easily manage user file uploads and downloads and an access control method enables you to assign read or write permission. Appwrite Storage service also offers built-in integration with an auto-updated antivirus server.&lt;/p&gt;

&lt;p&gt;One of the key features of Appwrite's storage service is its file preview and delivery options for images. Appwrite uses smart cache and image compression to deliver images and thumbnails quickly. This enables web and mobile developers to deliver images and thumbnails by caching them for faster delivery and compressing them to reduce the size of images.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Authentication:&lt;/strong&gt; Appwrite's authentication feature is a powerful and flexible way to manage user &lt;a href="https://appwrite.io/docs/client/account"&gt;authentication&lt;/a&gt; and access control in your application which provides a secure and consistent API for creating and managing user accounts and handling user sessions and access tokens.&lt;/p&gt;

&lt;p&gt;Additionally, it provides a variety of authentication methods, including email and password, and built-in interaction with numerous OAuth providers such as OKta, Github, and more.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Databases:&lt;/strong&gt; The &lt;a href="https://appwrite.io/docs/client/databases"&gt;databases&lt;/a&gt; service accepts an unlimited number of databases, each of which can include an unlimited number of collections. It also allows you to create a structured collection of documents with access controls for users, teams, and public access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Developers must protect their applications and user data from unauthorized access and attacks. Appwrite helps you develop your applications more securely by providing end-to-end protection for your backend and implementing robust encryption methods to protect your data from attackers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can access a comprehensive list of services provided by Appwrite &lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Implementation and Management
&lt;/h1&gt;

&lt;p&gt;First, it's important to plan and execute the implementation of the chosen solution. This includes migrating data from existing storage solutions, setting up the data storage solution, and configuring it to meet your company's specific needs.&lt;/p&gt;

&lt;p&gt;After implementation, it's important to properly manage and monitor the storage system to ensure its effectiveness. This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regularly backing up data&lt;/li&gt;
&lt;li&gt;Monitoring the solution for potential issues&lt;/li&gt;
&lt;li&gt;Making updates and upgrades as needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's also essential to have a plan in place for disaster recovery in case of any data loss.&lt;/p&gt;

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

&lt;p&gt;It's vital to assess your company's specific needs and to consider factors such as data growth and stability, performance, and access speed while choosing a data storage solution. This post discussed how to select a data storage solution for your company.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;p&gt;For further exploration of Appwrite, you may find the following resources helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/storage"&gt;Appwrite Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;Appwrite Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/invite/GSeTUeA"&gt;Appwrite Discord&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>storage</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Criteria for Choosing an API for Your Jamstack Project</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Tue, 03 Jan 2023 11:43:06 +0000</pubDate>
      <link>https://dev.to/hackmamba/criteria-for-choosing-an-api-for-your-jamstack-project-2j42</link>
      <guid>https://dev.to/hackmamba/criteria-for-choosing-an-api-for-your-jamstack-project-2j42</guid>
      <description>&lt;p&gt;&lt;a href="https://www.netlify.com/jamstack/"&gt;Jamstack&lt;/a&gt; is a modern way of building high-performance and scalable web applications. This web development architecture helps developers and businesses build applications with a better user experience. Over the years, Jamstack has become more popular within the developer ecosystem due to its functionalities like headless CMS (content management system) and static-site generators.&lt;/p&gt;

&lt;p&gt;APIs are essential when building with the Jamstack architecture. This architecture allows you to build web applications using different third-party APIs. The Jamstack API approach helps you build applications faster and leverage unique products for different elements of your application.&lt;/p&gt;

&lt;p&gt;For instance, when building a blogging application, you may use Gatsby for the front end, a search and discovery API instead of writing a custom search module to enable users to filter posts, and a headless content management system API instead of setting up a CMS.&lt;/p&gt;

&lt;p&gt;This post will share what to look for in your provider before choosing an API for your next Jamstack Project.&lt;/p&gt;

&lt;h1&gt;
  
  
  What to look for in your API solution provider
&lt;/h1&gt;

&lt;p&gt;Different factors will influence your API solution selection, some relating more specifically to your application or business goals. You can score providers based on the following factors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature-compliant
&lt;/h2&gt;

&lt;p&gt;One vital part of your selection process should include an evaluation of the API solution to ensure it meets your application's requirements.&lt;/p&gt;

&lt;p&gt;Does the solution meet your application's functional and non-functional requirements such as performance, usability, and accessibility?&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;p&gt;You need to access the documentation in detail. Ensure that the documentation has clear and useful guides; this helps you avoid wasting time and effort, making it possible to integrate your application quickly.&lt;/p&gt;

&lt;p&gt;Accessing the documentation also helps you understand if an API solution has some limitations, such as having a limited number of requests per hour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upgrade Process
&lt;/h2&gt;

&lt;p&gt;Regardless of your chosen solution, you must update it regularly to ensure you get the most recent improvements and features. Ensure the solution has a release note, as this will provide details about the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Community and Support
&lt;/h2&gt;

&lt;p&gt;Developers encounter problems or have specific questions during the implementation phase so it is vital to ensure that an active and helpful &lt;a href="https://dev.to/hackmamba/top-7-discord-servers-every-developer-should-join-59nd"&gt;&lt;/a&gt;&lt;a href="https://dev.to/hackmamba/top-7-discord-servers-every-developer-should-join-59nd"&gt;developer community&lt;/a&gt; is available for the provider you are considering.&lt;/p&gt;

&lt;p&gt;Communities also serve as a knowledge bank for your team.&lt;/p&gt;

&lt;h1&gt;
  
  
  Veritable API solution
&lt;/h1&gt;

&lt;p&gt;It is certainly possible to feel overwhelmed by too many choices. To help you decide, based on my assessment of multiple API solution providers, &lt;strong&gt;Appwrite&lt;/strong&gt; meets all the above requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  About Appwrite
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite&lt;/a&gt; is a &lt;em&gt;self-hosted&lt;/em&gt; open-source BaaS (&lt;em&gt;backend-as-a-service)&lt;/em&gt; tool with which developers can build complete web and mobile applications without a custom backend server via a set of APIs and a management console UI.&lt;/p&gt;

&lt;p&gt;It is cross-platform (runs on any operating system) and supports web and mobile technologies and Jamstack frameworks such as Next.js, Gatsby, and Nuxt.js. You can integrate Appwrite directly with your client app and use it behind your custom backend or alongside your custom backend server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Appwrite also offers flexible API features&lt;/strong&gt; &lt;strong&gt;like:&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Databases
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://appwrite.io/docs/client/databases"&gt;databases&lt;/a&gt; service accepts an unlimited number of databases, each of which can include an unlimited number of collections. It also allows you to create a structured collection of documents with access controls for users, teams, and public access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication
&lt;/h2&gt;

&lt;p&gt;You can easily manage user login and registration for your app using the &lt;a href="https://appwrite.io/docs/client/account"&gt;Appwrite authentication&lt;/a&gt; service. Additionally, the Auth service provides built-in interaction with numerous OAuth service providers, including Google, Github, Okta, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Webhooks
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://appwrite.io/docs/webhooks"&gt;Appwrite Webhooks&lt;/a&gt; can be used to communicate in real-time when specific events take place and this sends an HTTP POST payload to the webhook's configured URL. &lt;/p&gt;

&lt;h2&gt;
  
  
  Security
&lt;/h2&gt;

&lt;p&gt;Security is an integral part of any application. Appwrite aims to help you develop your applications more securely by providing end-to-end protection for your backend and implementing robust encryption methods to safeguard your data from attackers.&lt;/p&gt;

&lt;p&gt;You can find the complete list of services offered by Appwrite &lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;here&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;API solution selection is essential. However, your decision should strongly be influenced by the requirements of your application. This post discussed the criteria for choosing an API for your Jamstack application.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;p&gt;For further exploration of Appwrite, you may find the following resources helpful.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;Appwrite Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/invite/GSeTUeA"&gt;Appwrite Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/appwrite/appwrite"&gt;Appwrite open-source contributors&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What I wish I'd known before choosing a backend infrastructure</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Fri, 11 Nov 2022 08:20:44 +0000</pubDate>
      <link>https://dev.to/hackmamba/what-i-wish-id-known-before-choosing-a-backend-infrastructure-3jhh</link>
      <guid>https://dev.to/hackmamba/what-i-wish-id-known-before-choosing-a-backend-infrastructure-3jhh</guid>
      <description>&lt;p&gt;An attractive user interface, smooth scrolling, and animations are some of the features of modern web and mobile applications. But another layer sits behind everything else that's equally important: the backend.&lt;/p&gt;

&lt;p&gt;The backend is like the backbone of any application. It accounts for all database and server-related actions; thus, it is fundamental to the proper functioning of any software. However, backend infrastructure can be complicated and time-consuming to create, and it can require considerable knowledge and experience.&lt;/p&gt;

&lt;p&gt;In this article, you'll learn about the factors to consider when choosing a backend infrastructure.&lt;/p&gt;

&lt;h1&gt;
  
  
  Things to consider before choosing a backend infrastructure
&lt;/h1&gt;

&lt;p&gt;Building the backend infrastructure for an application can be a difficult task, as you are responsible for all the server-side functionalities. This means you have to worry about storage, hosting, server management, and several other functionalities.&lt;/p&gt;

&lt;p&gt;Different factors need to considered when choosing the right infrastructure. Let’s go through some of the essential factors to look out for and consider before making a decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Platform maintenance
&lt;/h2&gt;

&lt;p&gt;The success of a great-looking frontend can be easily undone without solid backend support. Backend maintenance is essential when choosing an infrastructure, as the development process doesn't end with the application launch. &lt;/p&gt;

&lt;p&gt;Long-term maintenance is also required to ensure that the application is up to date and doesn't become redundant. Make sure you select an infrastructure that makes maintenance, such as bug fixes and updates, a stress-free process.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Speed
&lt;/h2&gt;

&lt;p&gt;Speed contributes not only to the experience of an application, but it is also quite important to the users of an application. Users shouldn’t have to wait 10-15 seconds for your application to load.&lt;/p&gt;

&lt;p&gt;Speed is also an essential factor of SEO. &lt;/p&gt;

&lt;h2&gt;
  
  
  3. Scalability
&lt;/h2&gt;

&lt;p&gt;It is also vital to think about your application's future. If you intend for it to grow, it needs to be scalable and easily maintainable. &lt;/p&gt;

&lt;p&gt;Scalability is key to sustaining the user base and ensuring a pleasant user experience for the traffic. Thus, selecting an infrastructure that is scalable and reliable is very important.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Security
&lt;/h2&gt;

&lt;p&gt;Cyberattacks have been happening increasingly and will continue to happen. Protecting your database and servers is crucial to safeguard your users' data. Ensure that the infrastructure in place adheres to best security practices while closing all loopholes that malicious actors could exploit.&lt;/p&gt;

&lt;p&gt;This should be the top-most priority when selecting a backend infrastructure.&lt;/p&gt;

&lt;h1&gt;
  
  
  One platform to ship faster
&lt;/h1&gt;

&lt;p&gt;Based on my assessment of multiple backend as a service (BaaS) providers, Appwrite stood out. Unlike many other providers, this BaaS ticks all the boxes from the requirements listed above, and it also allows you to self-host your data, which is great if you are keen on privacy.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Appwrite?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://appwrite.io/?utm_source=hackmamba&amp;amp;utm_medium=hackmamba-blog"&gt;Appwrite&lt;/a&gt; is an open-source BaaS tool with which developers can build complete web and mobile applications without a custom backend server via a set of APIs and a management console UI. &lt;/p&gt;

&lt;p&gt;It is cross-platform (runs on any operating system) and supports web and mobile technologies and frameworks such as Flutter, Angular, and React. You can integrate Appwrite directly with your client app and use it behind your custom backend or alongside your custom backend server.&lt;/p&gt;

&lt;p&gt;Appwrite has an active community of open-source &lt;a href="https://github.com/appwrite/appwrite"&gt;contributors&lt;/a&gt; constantly trying to improve the tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Appwrite?
&lt;/h2&gt;

&lt;p&gt;Based on my experience with several BaaS providers, Appwrite not only helps reduce many of the difficulties associated with developing a reliable application, but it's also easy and quick to set up.&lt;/p&gt;

&lt;p&gt;Appwrite offers the following services and helps you to speed up your development process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Storage&lt;/strong&gt;&lt;br&gt;
With the Appwrite &lt;a href="https://appwrite.io/docs/server/storage"&gt;storage&lt;/a&gt; service, you can easily manage user file uploads and downloads, and an access control method enables you to assign read or write permission. Appwrite Storage service also offers built-in integration with an auto-updated anti-virus server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;br&gt;
The &lt;a href="https://appwrite.io/docs/client/databases"&gt;databases&lt;/a&gt; service accepts an unlimited number of databases, each of which can include an unlimited number of collections. It also allows you to create a structured collection of documents with access controls for users, teams, and public access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt;&lt;br&gt;
You can &lt;a href="https://appwrite.io/docs/client/account"&gt;easily manage&lt;/a&gt; user login and registration for your app using the Appwrite authentication service. Additionally, the Auth service provides built-in interaction with numerous OAuth service providers, including Google, Github, Okta, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Localization&lt;/strong&gt;&lt;br&gt;
The &lt;a href="https://appwrite.io/docs/client/locale"&gt;Locale&lt;/a&gt; service allows you to modify your app based on the location of your users. This service will enable you to obtain your users' location, IP address, names of countries and continents, phone codes, currencies, and other information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Teams&lt;/strong&gt;&lt;br&gt;
The Teams service enables you to group users and grant them read and write access to project resources such as database documents and storage files. This approach allows you to build sophisticated access control needs for your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;br&gt;
Security is an integral part of any application. Appwrite aims to help you develop your applications more securely by providing end-to-end protection for your backend and implementing strong encryption methods to safeguard your data from attackers.&lt;/p&gt;

&lt;p&gt;I've identified a few of Appwrite's services, but you can read the official &lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;documentation&lt;/a&gt; to find out about the full range of services provided.&lt;/p&gt;

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

&lt;p&gt;Selecting the proper backend infrastructure is essential for the success of an application. This article taught you the factors to consider when choosing a backend infrastructure.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs?utm_source=hackmamba&amp;amp;utm_medium=blog&amp;amp;utm_campaign=hackmamba"&gt;Appwrite Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-server"&gt;Getting started with Appwrite for server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-web"&gt;Getting started with Appwrite for web&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://appwrite.io/docs/getting-started-for-android"&gt;Getting started with Appwrite for android&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>backend</category>
      <category>baas</category>
    </item>
    <item>
      <title>Quickly Create Interactive Charts in Django</title>
      <dc:creator>Shuaib Oseni</dc:creator>
      <pubDate>Wed, 23 Mar 2022 14:56:44 +0000</pubDate>
      <link>https://dev.to/hackmamba/quickly-create-interactive-charts-in-django-4fod</link>
      <guid>https://dev.to/hackmamba/quickly-create-interactive-charts-in-django-4fod</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This post was originally published on &lt;a href="https://hackmamba.io/blog/2022/03/quickly-create-interactive-charts-in-django/"&gt;Hackmamba&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://plotly.com/python/"&gt;Plotly&lt;/a&gt; python library is an open-source library for rendering interactive charts. With Plotly, we can visualize data using several plots like a bar, box, histogram, line, etc.&lt;/p&gt;

&lt;p&gt;Plotly supports over 40 chart kinds, encompassing a wide range of statistical, financial, geographic, scientific, and 3-dimensional applications. Plotly enables Python users to create beautiful interactive web-based visualizations.&lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll be looking at integrating Plotly in Django by building a simple &lt;a href="https://en.wikipedia.org/wiki/Gantt_chart"&gt;Gantt&lt;/a&gt; chart project.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/shosenwales/Gantt-Chart"&gt;https://github.com/shosenwales/Gantt-Chart&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To follow along with this tutorial, we must have the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.python.org/downloads/"&gt;Python3&lt;/a&gt; installed.&lt;/li&gt;
&lt;li&gt;A basic understanding of Django.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setup Project
&lt;/h2&gt;

&lt;p&gt;Let’s start by creating a new virtual environment.&lt;/p&gt;

&lt;p&gt;A virtual environment allows us to create a virtual space on our computer. By creating a virtual environment, we separate the necessary library installation for a project without installing them globally.&lt;/p&gt;

&lt;p&gt;Now, let’s create a virtual environment &lt;code&gt;env&lt;/code&gt; by running the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; python &lt;span class="nt"&gt;-m&lt;/span&gt; venv &lt;span class="nb"&gt;env&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We tell Python to create the virtual environment in a folder named &lt;code&gt;env&lt;/code&gt; in the current directory.&lt;/p&gt;

&lt;p&gt;On creation, we activate the virtual environment using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source env&lt;/span&gt;/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On activating the environment, install Django using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;django
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s create a new Django project &lt;code&gt;django_plotly&lt;/code&gt; using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;django-admin startproject django_plotly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we navigate to the &lt;code&gt;django_plotly&lt;/code&gt; directory and create a Django app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;django_plotly

django-admin startapp charts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s add our app to the list of already installed apps.&lt;br&gt;
Navigate to the &lt;code&gt;django_plotly&lt;/code&gt; directory and edit the &lt;code&gt;settings.py&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
    &lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s"&gt;'django.contrib.admin'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;'django.contrib.auth'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;'django.contrib.contenttypes'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;'django.contrib.sessions'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;'django.contrib.messages'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;'django.contrib.staticfiles'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;'charts'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let’s install plotly by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; pip &lt;span class="nb"&gt;install &lt;/span&gt;&lt;span class="nv"&gt;plotly&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;5.6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, we need to install &lt;a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html"&gt;pandas&lt;/a&gt; by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    pip &lt;span class="nb"&gt;install &lt;/span&gt;pandas
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Creating a model
&lt;/h2&gt;

&lt;p&gt;This tutorial will create an interactive chart that visualizes data from different projects in our application.&lt;/p&gt;

&lt;p&gt;For our model, we’ll be creating a couple of fields: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt; -The name field.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;start_date&lt;/code&gt; - The start date field&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;responsible&lt;/code&gt; - The user/owner field&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;week_number&lt;/code&gt; - The week number field&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;finish_field&lt;/code&gt;  - The finish date field&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under the &lt;code&gt;charts&lt;/code&gt; directory, copy and paste the following code in the &lt;code&gt;models.py&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.db&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.contrib.auth.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;User&lt;/span&gt;

    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Chart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CharField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
        &lt;span class="n"&gt;start_date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DateField&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;responsible&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ForeignKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;on_delete&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CASCADE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;week_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CharField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;finish_date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DateField&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="c1"&gt;#string representation method
&lt;/span&gt;        &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__str__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;#overiding the save method
&lt;/span&gt;        &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;start_date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isocalendar&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;week_number&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;week_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;start_date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isocalendar&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="nb"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Now, let’s register the model Chart in the &lt;code&gt;admin.py&lt;/code&gt; file to modify it in the Django admin section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Chart&lt;/span&gt;

    &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Chart&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we need to migrate our model to the database.&lt;/p&gt;

&lt;p&gt;Django's migrations allow us to publish changes to our models into the database schema. As a result, when we create a new model, we migrate to the database and create the needed table.&lt;/p&gt;

&lt;p&gt;We migrate by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt; &lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;manage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="n"&gt;makemigrations&lt;/span&gt; &lt;span class="c1"&gt;# migrating the app and database changes
&lt;/span&gt;    &lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;manage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="n"&gt;migrate&lt;/span&gt;        &lt;span class="c1"&gt;# final migrations
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A superuser has the permissions to create, edit, update and delete data in Django admin.&lt;br&gt;
Create a superuser by running the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; python manage.py createsuperuser

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

&lt;/div&gt;



&lt;p&gt;We may now access the admin page.&lt;br&gt;
To log in to the admin part of the server, use the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; python manage.py runsever
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, go to &lt;code&gt;http://localhost:8000/admin&lt;/code&gt;, and log in with our superuser credentials.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o9EDC3H_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645696348672_admin.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o9EDC3H_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645696348672_admin.png" alt="admin dashboard" width="672" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a view
&lt;/h2&gt;

&lt;p&gt;A view in Django is a function that accepts a web request and returns a web response.&lt;/p&gt;

&lt;p&gt;Now, let’s create a views.py file in our leading project directory &lt;code&gt;django_plotly&lt;/code&gt; and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;charts.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Chart&lt;/span&gt;
    &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;plotly.offline&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;plot&lt;/span&gt;
    &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;plotly.express&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;qs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Chart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;projects_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s"&gt;'Project'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s"&gt;'Start'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;start_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s"&gt;'Finish'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;finish_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s"&gt;'Responsible'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;responsible&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;qs&lt;/span&gt;
        &lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DataFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;projects_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;fig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;timeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x_start&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x_end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Finish"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Project"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Responsible"&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;update_yaxes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;autorange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"reversed"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;gantt_plot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"div"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'plot_div'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;gantt_plot&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'index.html'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Let’s take a closer look at our view:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We imported &lt;code&gt;pandas&lt;/code&gt; , a library we installed earlier.&lt;/li&gt;
&lt;li&gt;We also imported some modules from plotly.&lt;/li&gt;
&lt;li&gt;We created a function &lt;code&gt;index&lt;/code&gt; , which takes in a request. Then we defined a queryset that grabs all the data in our database.&lt;/li&gt;
&lt;li&gt;Next, we created an object in &lt;code&gt;projects_data&lt;/code&gt;  to prepare the data for our chart. The &lt;code&gt;Project:x.name&lt;/code&gt; represents our project name, &lt;code&gt;Start:start_date&lt;/code&gt; represents our project start date, &lt;code&gt;Finish:finish_date&lt;/code&gt; represents our project end date and finally &lt;code&gt;Responsible:responsible.username&lt;/code&gt; represents the creator of a project displayed on the chart. &lt;/li&gt;
&lt;li&gt;Then we used plotly’s &lt;code&gt;timeline&lt;/code&gt; to plot our chart, where the &lt;code&gt;x_start&lt;/code&gt; and &lt;code&gt;x_end&lt;/code&gt; make up the x-axis, and &lt;code&gt;y&lt;/code&gt; make up the y-axis. The &lt;code&gt;colour&lt;/code&gt; helps us distinguish between projects by assigning different colours.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;plot_div&lt;/code&gt; is what we will use in our template, which we will create soon.
## Creating templates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We start by creating a templates directory in our base directory. This templates directory will house our &lt;code&gt;index.html&lt;/code&gt;  and &lt;code&gt;base.html&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;base.html&lt;/code&gt; is the skeleton for all pages in the application.&lt;/p&gt;

&lt;p&gt;Next, we add the following lines of code to the &lt;code&gt;base.html&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;"X-UA-Compatible"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"IE=edge"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- Bootstrap css --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;integrity=&lt;/span&gt;&lt;span class="s"&gt;"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"&lt;/span&gt; &lt;span class="na"&gt;crossorigin=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Plotly Chart&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container mt-3"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            {% block content %}
            {% endblock content %}
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- Bootstrap Js --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"&lt;/span&gt; &lt;span class="na"&gt;integrity=&lt;/span&gt;&lt;span class="s"&gt;"sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB"&lt;/span&gt; &lt;span class="na"&gt;crossorigin=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js"&lt;/span&gt; &lt;span class="na"&gt;integrity=&lt;/span&gt;&lt;span class="s"&gt;"sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13"&lt;/span&gt; &lt;span class="na"&gt;crossorigin=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next,  we display our charts by adding the following code in our &lt;code&gt;index.html&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;
    {% extends "base.html" %}
    {% block content %}
        {% autoescape off %}
            {{ plot_div }}
        {% endautoescape %}}
    {% endblock content %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we need to update the &lt;code&gt;DIRS&lt;/code&gt; to the path of the templates folder in our &lt;code&gt;settings.py&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
    &lt;span class="n"&gt;TEMPLATES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s"&gt;'BACKEND'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'django.template.backends.django.DjangoTemplates'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s"&gt;'DIRS'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="n"&gt;BASE_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="s"&gt;'templates'&lt;/span&gt; &lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s"&gt;'APP_DIRS'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s"&gt;'OPTIONS'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s"&gt;'context_processors'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                    &lt;span class="s"&gt;'django.template.context_processors.debug'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s"&gt;'django.template.context_processors.request'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s"&gt;'django.contrib.auth.context_processors.auth'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s"&gt;'django.contrib.messages.context_processors.messages'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we edit our &lt;code&gt;urls.py&lt;/code&gt; by adding the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;.views&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;
    &lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'admin/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s add a few projects and another user to our Django admin.&lt;/p&gt;

&lt;p&gt;Click on the chart, then click &lt;code&gt;Add Editor&lt;/code&gt; to add a project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oxNZX3Hg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645700067630_web.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oxNZX3Hg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645700067630_web.png" alt="web project" width="880" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One more project&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TMHo4IpL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645700117562_django.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TMHo4IpL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645700117562_django.png" alt="django project" width="880" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s test this out by starting the server with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PzDhga-9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645700636640_full-chart.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PzDhga-9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_ADE9AAAB92E4CD5C41BF8866FC8A4F886894F722B4056ADBA4E1ABF4BEC2F8DA_1645700636640_full-chart.png" alt="Gantt chart" width="880" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This article introduced Plotly, building a Gantt chart, and, most importantly, integrating Plotly in Django.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Plotly Documentation  - &lt;a href="https://plotly.com/python/getting-started/"&gt;Getting Started with Plotly in Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kaggle - &lt;a href="https://www.kaggle.com/kanncaa1/plotly-tutorial-for-beginners"&gt;Plotly Tutorial for Beginners&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>django</category>
      <category>charts</category>
      <category>web</category>
    </item>
  </channel>
</rss>
