<?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: Mufassir Kazi</title>
    <description>The latest articles on DEV Community by Mufassir Kazi (@mufassirkazi).</description>
    <link>https://dev.to/mufassirkazi</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%2F613084%2F799ac730-b67f-4ea7-9f4e-485e6a71f47a.jpeg</url>
      <title>DEV Community: Mufassir Kazi</title>
      <link>https://dev.to/mufassirkazi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mufassirkazi"/>
    <language>en</language>
    <item>
      <title>The Best Backend For FlutterFlow 2024</title>
      <dc:creator>Mufassir Kazi</dc:creator>
      <pubDate>Tue, 06 Feb 2024 10:31:46 +0000</pubDate>
      <link>https://dev.to/buildship/the-best-backend-for-flutterflow-2024-1fl4</link>
      <guid>https://dev.to/buildship/the-best-backend-for-flutterflow-2024-1fl4</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1idcti9awh1t4xu7y3r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1idcti9awh1t4xu7y3r.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the dynamic world of mobile app development, finding the right backend solution can be a pivotal decision, especially when working with platforms like FlutterFlow. The backend serves as the backbone of any application, handling data, user authentication, and overall functionality. As FlutterFlow empowers developers to create stunning apps with minimal code, the quest for the best backend becomes even more critical.&lt;/p&gt;

&lt;p&gt;In this article, we embark on a journey to explore and evaluate BuildShip - a lowcode visual backend builder, aiming to guide FlutterFlow enthusiasts towards selecting the optimal backend solution that easily complements their development endeavors. Whether you're a seasoned developer or a newcomer to the FlutterFlow ecosystem, understanding BuildShip can significantly enhance the efficiency and success of your app-building journey. &lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Flutterflow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiy28oxz5g2i5qs9ygygd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiy28oxz5g2i5qs9ygygd.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before diving in, let's quickly recap &lt;a href="//www.flutterlow.io"&gt;FlutterFlow&lt;/a&gt;. It's a tool that empowers you to construct user interfaces, establish logical flows, integrate data into your app, and deploy to app stores—all without the need for coding. It aims to simplify the app development process and make it accessible to a broader audience, including those without extensive programming experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding BuildShip
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgdwufjxvtsv53s8huq6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgdwufjxvtsv53s8huq6.png" alt="Image description" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter &lt;a href="//www.buildship.com"&gt;BuildShip&lt;/a&gt;, an AI powered low-code backend builder that empowers you to create complex workflows, without writing into a single line of code.&lt;/p&gt;

&lt;p&gt;Gone are the days of hand-coding with NodeJS, setting up a REST API server, and navigating through manual integrations. With BuildShip, you can now seamlessly integrate in a zapier-style nocode format while retaining the freedom to code your REST APIs in Javascript low-code style. This means you no longer compromise on the limitations often associated with no-code tools; instead, you have the code accessibility to modify as needed, ensuring unparalleled flexibility.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Coding Language: English + Javascript&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine hundreds of pre-built nodes at your fingertips, ready to send emails, generate reports, or connect to databases. Just drag, drop, and watch the magic happen.&lt;/p&gt;

&lt;p&gt;And if you can't find the node you're looking for, BuildShip's incredible in-built AI can build a custom node just for you. You can even tweak it in low-code, so you're always in control.&lt;/p&gt;

&lt;p&gt;In this article, we’ll explore how BuildShip can help empower no-code developers to do full stack development using Flutterflow and BuildShip.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrating BuildShip with FlutterFlow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1edyxukjjopn1s3fup7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1edyxukjjopn1s3fup7b.png" alt="Image description" width="800" height="713"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, let's tackle a key question: Where to begin—front end or back end? It all depends on what your app needs. If you're already using FlutterFlow or need features like authentication from Firebase, start with the front end. But if you're dealing with big data, complex calculations, or non-Firebase databases, kick off your app development journey with BuildShip's backend playground. It's designed to handle heavy-duty data tasks and make backend operations smoother.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why BuildShip for Flutterflow?
&lt;/h2&gt;

&lt;p&gt;Let’s look at a number of possible reason for why BuildShip is the perfect backend choice for your Flutterflow app&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visual Logic Building:&lt;/strong&gt; Drag, Drop, and Reorder - Create Logic the way you want: While it might seem simple, a significant aspect of automating or constructing workflows lies in the complexity that can arise as you continue to build your app. With BuildShip, you have these building blocks called as nodes, that you can remove, reorder or customise any way you want.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Time Efficiency:&lt;/strong&gt; For those familiar with setting up Cloud Functions in the past, the waiting time after hitting deploy was a familiar frustration. Thanks to BuildShip, that's a thing of the past. Now, you deploy once, and subsequent redeployments take mere seconds to reflect changes. This saved time can be put to more productive use—how about enhancing your FlutterFlow UI itself?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ready to use Database:&lt;/strong&gt; Versatility in Database Options: Each BuildShip project is equipped with a Google Cloud project that includes Firestore by default, eliminating the need for manual database setup. Alternatively, you can easily connect with a database of your choosing, utilizing either AI or opting from our array of supported database choices, including &lt;a href="https://docs.buildship.com/database/supabase"&gt;Supabase&lt;/a&gt;, &lt;a href="https://docs.buildship.com/database/firebase"&gt;Firebase&lt;/a&gt;, &lt;a href="https://docs.buildship.com/database/pinecone"&gt;Pinecone&lt;/a&gt;, and &lt;a href="https://docs.buildship.com/database/mysql"&gt;MySQL&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unlimited Storage for your assets:&lt;/strong&gt; Not every application needs a constant connection to an online database for data storage and retrieval. Many applications benefit from simply storing data on a user's device. Occasionally, you may need to transfer this data to an online database for safekeeping. BuildShip enables you to store and retrieve data locally, offering the flexibility to build genuinely intricate FlutterFlow apps without being binded to a constant online connection. Better yet, your data is stored in the region of your choice during project creation - making them GDPR compliant for EU regions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy Import, Easy Export:&lt;/strong&gt; BuildShip provides an incredible export tool, that lets you export your API  in the YAML format and have it directly imported into Flutterflow as a brand new API call.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integrating Payment Apps:&lt;/strong&gt; Integrating with payments apps like Stripe solely through FlutterFlow can be challenging, particularly when retrieving the payment ID from Stripe. BuildShip, on the contrary, simplifies this process, making it easier to integrate with your Stripe account and showcase all the necessary information on the frontend by passing the data. Below is a template to guide you through it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Logic Flows and Security:&lt;/strong&gt; When it comes to making logical decisions on your data and ensuring secure access, what options do you have for presenting it back to FlutterFlow? BuildShip offers utility nodes that empower you to construct logical workflows and easily integrate with any tool for automating various tasks. In terms of security, every time you generate a secret key, BuildShip uses the user's Google Cloud Secret Manager, avoiding the storage of keys in a vulnerable random database. Everything within BuildShip operates on Google's infrastructure, designed for scalability and robust security. No need to navigate the complexities of API calls – BuildShip has you covered.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Flutterflow Community Wishlist
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzqs6989kr4w5jge51oi3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzqs6989kr4w5jge51oi3.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many FlutterFlow users seek a no-code backend solution catering to complex business logic, organized data structures, secure API requests, and simplified frontend modifications or upgrades.&lt;/p&gt;

&lt;p&gt;Queries for a no-code backend is rising, underscoring the demand for BuildShip within the vibrant FlutterFlow community forums:&lt;/p&gt;

&lt;h2&gt;
  
  
  BuildShip x FlutterFlow: The Full Stack Power Couple 🔥
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd90fluk8m1hjl6atoiz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd90fluk8m1hjl6atoiz.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To integrate with any frontend app, creating an API is essential. This begins by adding a Trigger, and BuildShip provides various triggers tailored to your use case, illustrated below.&lt;/p&gt;

&lt;p&gt;For instance, utilize the REST API node to trigger a call from the frontend to a custom REST API you can create yourself. Plus, the compatibility of Flutterflow with REST APIs adds an extra layer of convenience.&lt;/p&gt;

&lt;p&gt;In this &lt;a href="https://www.youtube.com/watch?v=2OzgeHxpMs4"&gt;tutorial&lt;/a&gt;, discover the ins and outs of full stack development using  Flutterflow and BuildShip. To do this, we’ll build a barcode scanning app that instantly reveals nutritional info, reviews, and even suggested recipes for the scanned product.&lt;/p&gt;

&lt;p&gt;Further, scroll down to explore more apps created with Flutterflow and BuildShip, offering insights into the harmonious fusion of workflows and beautifully designed UIs. 🚀&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=8CoU_PzFyPQ"&gt;Fully decoupled Flutterflow &amp;amp; BuildShip powered AI lesson plan generator app for teachers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=hF3r8l9U1o8&amp;amp;list=UULFuV0yG992ILG-wNBSKTEwhQ&amp;amp;index=18"&gt;Create full-stack web application using BuildShip, Flutterflow and Supabase (3-part series)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=9VJiJTfJSSg"&gt;Build complex no-code apps with ease  with James NoCode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://buildship.com/case-studies/giftit"&gt;Building the Backend of an Early Stage Startup Using Flutterflow and BuildShip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In the realm of FlutterFlow backend solutions, BuildShip emerges as a transformative force, offering a low-code, high-flexibility approach to full-stack development. With features like pre-built nodes, drag-and-drop simplicity, and an AI that tailors custom nodes, BuildShip provides unparalleled control. As you embark on your app-building journey, the choice is clear: BuildShip is the engine that propels your FlutterFlow experience to new heights.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>lowcode</category>
      <category>ai</category>
      <category>backenddevelopment</category>
    </item>
    <item>
      <title>RudderStack - The Open Source Alternative to Segment</title>
      <dc:creator>Mufassir Kazi</dc:creator>
      <pubDate>Tue, 25 Apr 2023 16:39:15 +0000</pubDate>
      <link>https://dev.to/mufassirkazi/rudderstack-the-open-source-alternative-to-segment-1n4d</link>
      <guid>https://dev.to/mufassirkazi/rudderstack-the-open-source-alternative-to-segment-1n4d</guid>
      <description>&lt;p&gt;With over 114+ team size and 3.5k+ GitHub stars, RudderStack is the most popular open-source alternative to Segment.&lt;/p&gt;

&lt;p&gt;To put it briefly, RudderStack assists you in gathering all your customer event data. Once you have collected it, you can easily send it to various teams within your organisation or third-party tools that require the collected data for further processing.&lt;/p&gt;

&lt;p&gt;This blog post covers the fundamentals, core features, integrations, pricing model, growth and the team behind Rudderstack. Let's get started! 🛠️&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does it all start? 🤔
&lt;/h2&gt;

&lt;p&gt;To gain insight into your users' behaviour, you need to map their journey on your website or mobile app. This may entail examining user interaction details such as click events, searches, impressions, recordings, and more.&lt;/p&gt;

&lt;p&gt;All this information needs to be stored somewhere, preferably in a data -warehouse like Redshift or Snowflake. This is where RudderStack comes in. ☄️&lt;/p&gt;

&lt;p&gt;RudderStack has SDKs (iOS, Android, JS, Python, etc) which are used to send these events. You can set up a backend (either you can self-host or RudderStack can host it for you) which collects these events and then stores them in your data warehouse 🫙. Once you have the data, you can leverage RudderStack features to perform various operations on your data.&lt;/p&gt;

&lt;p&gt;Let’s talk about the most important ones:&lt;/p&gt;

&lt;h2&gt;
  
  
  Features ✨
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Profiles
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z5ogGD2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5yu627du84vxifcew3dc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z5ogGD2u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5yu627du84vxifcew3dc.png" alt="User Profiles: RudderStack" width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Data is accumulated from various sources and dumped into the warehouse. These sources can be your website, mobile app, marketing platforms, sales engagements, etc.&lt;/p&gt;

&lt;p&gt;All this data, generated by different users, are made identifiable. Users can be identified by associating identifiers like email id, phone no, username, etc. Sometimes you may need multiple identifiers to distinguish between the same user for work and personal email access.&lt;/p&gt;

&lt;p&gt;Since all this data is spread across multiple tables within a warehouse, making sense of it is cumbersome and an error-prone task.&lt;/p&gt;

&lt;p&gt;Therefore RudderStack provides you with profiles. With profiles, you no longer need to run complex SQL queries. Instead, you get a unified 360-degree view of a user’s journey across your product(s).&lt;/p&gt;

&lt;h3&gt;
  
  
  User Identification
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FP4iGgpV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cp4gtswbmnrklt3c4fsy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FP4iGgpV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cp4gtswbmnrklt3c4fsy.png" alt="User Identification: RudderStack" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So last we talked about identifying users, but how do you go about implementing that in RudderStack?&lt;/p&gt;

&lt;p&gt;Simply, by using the &lt;code&gt;identify&lt;/code&gt; call. It allows you to record traits about a user like his email, username, phone, etc and associate it to their actions.&lt;/p&gt;

&lt;p&gt;This means that you should make the &lt;code&gt;identify&lt;/code&gt; call &lt;em&gt;after&lt;/em&gt; a user signs up for your product or logs into his account or updates his information. This way, you can record the trait with the action to identify them later.&lt;/p&gt;

&lt;p&gt;But that's not all 👀&lt;/p&gt;

&lt;p&gt;RudderStack also allows you to track visitors (not a customer yet) on your website by assigning them an Anonymous ID (&lt;code&gt;anonymousId&lt;/code&gt;). Such an id can be a session ID corresponding to the visitor’s session.&lt;/p&gt;

&lt;p&gt;Later, it helps you to turn these anonymous users into known users when they register for your product, thereby giving you the full view of a users journey - right from the time they visited the website to the point of conversion and beyond 🤯&lt;/p&gt;

&lt;h3&gt;
  
  
  Data governance
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VDyvEDrS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3ey3r5u0u8auwvudg1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VDyvEDrS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3ey3r5u0u8auwvudg1b.png" alt="Data Governance: RudderStack" width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Events are generally created in a specific format that can include:&lt;/p&gt;

&lt;p&gt;• Event type (button click event, page view event, etc)&lt;/p&gt;

&lt;p&gt;• Event properties (version, page, timestamp, etc)&lt;/p&gt;

&lt;p&gt;• Event metadata (option clicked, text copy, etc)&lt;/p&gt;

&lt;p&gt;Now since you’ll be generating hundreds of these events across your product, you need to maintain consistency while creating these events. Depending on the scale of your organisation, there might be multiple stakeholders who define and implement these event specifications. 👩🏼‍🎨👨‍💻👩🏼‍🎨👨‍💻&lt;/p&gt;

&lt;p&gt;This can lead to formatting inconsistencies that can be introduced in your data. Such inconsistencies can be missing fields, incorrect capitalisation (lowercase/uppercase) of event names or unit errors (pounds, dollars), etc.&lt;/p&gt;

&lt;p&gt;RudderStack data governance API was created to address these data inconsistencies. It helps you to zero in on these inconsistencies by giving you access to information on all your events and their related schema. This way, you can implement processes to set alerts (🚨) for all possible errors that can happen in a particular workflow. Eg: Create alerts for incorrect capitalisation, missing data type, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrations
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gYhTfYWA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8frslh417qivvogh4yvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gYhTfYWA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8frslh417qivvogh4yvy.png" alt="Integrations: RudderStack" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You often want to send a subset of your data to other 3rd party websites. An example use case can be using Mailchimp to send automated email campaigns. RudderStack forwards these events so you don’t have to deal with 3rd party libraries or wrangle with their SDKs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transformations
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XLf5RV6X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3es2ranyvxj1ijz3tdev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XLf5RV6X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3es2ranyvxj1ijz3tdev.png" alt="Transformations: RudderStack" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that you know the possibility of integrating with 3rd party apps, let’s see the power of transformations. 💪&lt;/p&gt;

&lt;p&gt;Transformations help you to write custom functions that transform your data before routing them to their destinations. There are several use cases where logic plays a crucial role, such as filtering to ensure that events are routed to the correct destinations, cleaning data, or enforcing data privacy through masking operations.&lt;/p&gt;

&lt;p&gt;On top of that, transformations help you to connect to internal databases and enrich your user profiles for better analysis. They also offer a templates section that will &lt;a href="https://www.rudderstack.com/docs/features/transformations/templates/"&gt;get you started.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  RudderStack 🆚 Segment
&lt;/h3&gt;

&lt;p&gt;• RudderStack is open source, allowing you to keep total control of your data. With Segment, 👎 , everything is with them.&lt;/p&gt;

&lt;p&gt;• RudderStack can turn your warehouse into a data source for the rest of your stack. Send enrich data to any destination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AayFVmTA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbpxvno490joif0cpsa4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AayFVmTA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbpxvno490joif0cpsa4.png" alt="RudderStack vs Segment Pricing" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• RudderStack pricing is based on events. Whereas, in Segment, you are priced on monthly tracked users&lt;/p&gt;

&lt;p&gt;• RudderStack also comes with added advantages by offering reverse ETL support, dedicated VPC hosting, session tracking and automatically building a customer data lake.&lt;/p&gt;

&lt;h3&gt;
  
  
  Growth over the years 📈
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h5FI96jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1fmurvq5u9nx9yk3rn1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h5FI96jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1fmurvq5u9nx9yk3rn1w.png" alt="RudderStack Growth Infographic" width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Starting in 2019, RudderStack has come a long way. Its pivotal entry in the dev tool space was through being an open-source alternative to Segment. Post garnering interest, RudderStack raised its $5M seed led by S28 capital in 2020.&lt;/p&gt;

&lt;p&gt;Fast forward, they’ve raised their series A and series B at $21M and $56M respectively and now have opened offices in India and Greenville. Reportedly, their revenue has also grown by almost four and a half times as their customer base is growing exponentially.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Team 👨‍💻👩‍💻
&lt;/h3&gt;

&lt;p&gt;The core team is a heavy mix of professionals who had already dealt with data on a large scale.&lt;/p&gt;

&lt;p&gt;The ship is captained by &lt;a href="https://www.linkedin.com/in/soumyadeb-mitra/"&gt;@soumyadeb_mitra&lt;/a&gt;, who has a PhD in database systems and was a Sr. Director at 8x8 post his previous startup acquisition (MairinaIQ) by the same company.&lt;/p&gt;

&lt;p&gt;This is followed by &lt;a href="https://www.linkedin.com/in/sumanthpuram/"&gt;@sumanthpuram&lt;/a&gt;, who is one of the core engineers at RudderStack since its inception. Current VP of Engineering, Sumanth was previously Co-founder &amp;amp; CTO at Code Astra, a mobile and web development agency.&lt;/p&gt;

&lt;p&gt;We also have &lt;a href="https://www.linkedin.com/in/brianlu8/"&gt;@brianylu&lt;/a&gt; who is the Director of Product at RudderStack. He has played a couple of cameos at big names viz DoorDash, Dropbox and Google. He also does a newsletter - This Week in Data - which you must check out.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting started 👉 3 ways
&lt;/h3&gt;

&lt;p&gt;• &lt;a href="https://www.rudderstack.com/docs/"&gt;Docs:&lt;/a&gt; Study their open source and managed offerings to get a feel of the product.&lt;/p&gt;

&lt;p&gt;• &lt;a href="https://www.rudderstack.com/contact/"&gt;Schedule a demo:&lt;/a&gt; Have a custom use case? -&amp;gt; Talk to one of their solution engineers.&lt;/p&gt;

&lt;p&gt;• &lt;a href="https://www.rudderstack.com/docs/user-guides/migration-guides/"&gt;Migration Docs:&lt;/a&gt; RudderStack has dedicated guides to help you migrate from other platforms (eg: Segment, Snowplow or from RudderStack self-hosted to RudderStack Cloud).&lt;/p&gt;

&lt;h3&gt;
  
  
  Author's Message
&lt;/h3&gt;

&lt;p&gt;Open source is still nascent and needs more exposure, especially among companies still locked in the depths of commercialised software.&lt;/p&gt;

&lt;p&gt;This is why I create bi-monthly, in-depth blog posts about open-source dev tools that catch my eye. By doing so, I hope to help companies save money, potentially hire new staff, and increase the revenue of deserving products.&lt;/p&gt;

&lt;p&gt;If you love my content, do give me a follow on &lt;a href="//www.twitter.com/mufassirkazi"&gt;Twitter&lt;/a&gt; (I speak my mind there) or connect with me on &lt;a href="//www.linkedin.com/in/mufassirkazi"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>developer</category>
      <category>devtools</category>
      <category>database</category>
    </item>
    <item>
      <title>GraphQL vs REST: Which API Type is Right for Your Application?</title>
      <dc:creator>Mufassir Kazi</dc:creator>
      <pubDate>Thu, 19 Jan 2023 14:48:20 +0000</pubDate>
      <link>https://dev.to/mufassirkazi/graphql-vs-rest-a-simplified-explanation-on-pros-cons-and-api-design-best-practices-2</link>
      <guid>https://dev.to/mufassirkazi/graphql-vs-rest-a-simplified-explanation-on-pros-cons-and-api-design-best-practices-2</guid>
      <description>&lt;p&gt;REST and GraphQL APIs are the developer's top choices for API design. With conflicting opinions on the internet, it's easy to get lost when debating which API type would make the most sense for your application.&lt;/p&gt;

&lt;p&gt;Before we do a deep dive, let's have a look at some of the common terminologies used while discussing APIs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resource&lt;/strong&gt;&lt;br&gt;
It is the basic building block of a RESTful service. When you pull information from a server (backend) to display on the client side (frontend), you are essentially fetching a resource. There are various HTTP methods (next point) you can perform on a resource.&lt;/p&gt;

&lt;p&gt;Eg. For an airline platform, &lt;code&gt;flight_name&lt;/code&gt;, &lt;code&gt;flight_details&lt;/code&gt;, and &lt;code&gt;no_of_passengers&lt;/code&gt; for a flight are examples of a resource.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /flights/today
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Airbus D-545-341&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_details&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hawaiian Airlines&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;N324KS&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_to&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Los Angeles&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;no_of_passengers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;284&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;time_of_departure&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;730 PM GMT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Airbus D-325-536&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_details&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hawaiian Airlines&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;L5DFD&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flight_to&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Los Angeles&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;no_of_passengers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;281&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;time_of_departure&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;530 PM GMT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="c1"&gt;// ... more fields here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HTTP methods:&lt;/strong&gt;&lt;br&gt;
Below are listed some of the most common types of HTTP methods.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;GET:&lt;/code&gt; Used in read-only mode, GET is the most common HTTP method. It is used to get a representational view of a resource's existing content.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;POST:&lt;/code&gt; This method enables developers to create a new resource. The data to be sent to the server is given in the request body.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PUT:&lt;/code&gt; Updates / replaces all the existing resource's content. The new data is sent in the request body to the server.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PATCH:&lt;/code&gt; Though not commonly used, PATCH, like PUT, updates a resource's content but just partially. To simply put (no pun intended), it modifies an existing resource.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DELETE:&lt;/code&gt; It deletes a resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data fetching &lt;/strong&gt;&lt;br&gt;
As the name suggests, data fetching is fetching data from the server to display on the client. With REST, it introduces drawbacks like "overfetching" or "under fetching". GraphQL, on the other hand, uses a query based approach which mitigates these drawbacks (more on this later).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Caching&lt;/strong&gt;&lt;br&gt;
It is the process of generating a cache which stores a subset of a data. This data then can be served up faster during future requests as they are already prefetched.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is a REST API?
&lt;/h2&gt;

&lt;p&gt;The successor of &lt;a href="https://www.altexsoft.com/blog/engineering/what-is-soap-formats-protocols-message-structure-and-how-soap-is-different-from-rest/" rel="noopener noreferrer"&gt;SOAP API&lt;/a&gt;, REST is a flexible, scalable, and easy to use architectural style. It was introduced as a simpler way to do server side communication.&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%2F0mv17i06ixnhwrh2mzlp.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%2F0mv17i06ixnhwrh2mzlp.png" alt="REST Structure" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A typical structure of a REST API consist of an endpoint, HTTP method, header and body.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An endpoint includes the URL of a server or service that helps to identify the resource to be fetched.&lt;/li&gt;
&lt;li&gt;You can specify the type of request that is to be sent to the server by using the HTTP methods described above.&lt;/li&gt;
&lt;li&gt;Headers are useful to provide information like caching, authentication tokens, etc to the client and server.&lt;/li&gt;
&lt;li&gt;The body consists of payload / information that a client wants to send to the server.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Okay, what is GraphQL then?
&lt;/h2&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%2Fkvw4ngx3yxp6ehv0vll3.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%2Fkvw4ngx3yxp6ehv0vll3.png" alt="GraphQL structure" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GraphQL uses a "query" based approach where you execute queries in a single request. You do not target different endpoints, instead, you specify what you want in the request body. The content inside the request body is in the form of GraphQL query which is parsed on the backend. &lt;/p&gt;

&lt;p&gt;This is a standardised approach and therefore there are rules defining how it should be parsed and what commands one can use, similar to how you would query a database.&lt;/p&gt;
&lt;h2&gt;
  
  
  The declarative vs imperative approach
&lt;/h2&gt;

&lt;p&gt;Think of it this way - You are at a grocery store going through your shopping list and self guiding yourself based on signs at end of each row. You find the items you need, fill your cart, then continue to checkout. It's imperative because it requires you to know where all items are stocked up. REST approach is similar. You have endpoints and you fetch resources from these different endpoints to source your app.&lt;/p&gt;

&lt;p&gt;GraphQL, on the other hand, follows a declarative approach. It's more like you have a personal assistant who goes and picks all items for you. The only thing you need is to 'declare' the items you need.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why not to REST
&lt;/h2&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%2Fv73ifu6skxcehb1uilec.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%2Fv73ifu6skxcehb1uilec.png" alt="Problems with REST API" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;1. Data fetching (again)&lt;/strong&gt;&lt;br&gt;
As discussed previously, REST API has a drawback of "underfetching" and "overfetching". Taking our airline platform example from earlier, suppose you only want details of all flights scheduled for the day.&lt;/p&gt;

&lt;p&gt;In case of REST, when you hit the endpoint &lt;code&gt;/flights/today&lt;/code&gt;, instead of just returning the flights information, it'll also include all other information that the endpoint has to offer i.e &lt;code&gt;noOfPassengers&lt;/code&gt;, &lt;code&gt;timings&lt;/code&gt;, &lt;code&gt;airlineInfo&lt;/code&gt;, etc. This idea of fetching more information than necessary is termed as "overfetching". Vice versa, "underfetching" is when the request doesn't return adequate information requiring you to make multiple calls on different endpoints for different resources.&lt;/p&gt;

&lt;p&gt;In case of GraphQL, you use a single request that can access data from multiple sources. Due to the query data structure, GraphQL allows you to precisely specify the type of data you want to receive from the server. This keeps your code concise and efficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Performance&lt;/strong&gt;&lt;br&gt;
Because REST has a drawback of overfetching, it returns a data set much larger than what is actually required. Of course, a lot largely depends on how the API is designed, but with REST, there is only so much you can specify.&lt;/p&gt;

&lt;p&gt;For example, let's study the request below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /dishes/details
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an example of a REST call to get a list of all food dishes served in a restaurant. The data returned for a single dish is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dish_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Apple Pie&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;preparation_time&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;170 mins.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$9.83&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ingredients&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2 1/2 cups all-purpose flour, 4 teaspoons sugar, 1/4 teaspoon fine salt, 14 tablespoons cold butter, diced, 1 large egg, 2 tablespoons freshly squeezed lemon juice, 3 pounds baking apples like Golden Delicious, Cortland, or Mutsu, 2/3 cup sugar, plus more for sprinkling on the pie, 1/4 cup unsalted butter, 1/4 teaspoon ground cinnamon, Generous pinch of ground nutmeg, 1 large egg, lightly beaten&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;

&lt;span class="c1"&gt;//More dishes here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem arises when you want only the &lt;code&gt;dish_name&lt;/code&gt; and &lt;code&gt;price&lt;/code&gt; property to be returned from the request. REST API doesn't allow you to extract specific properties from a given data set.&lt;/p&gt;

&lt;p&gt;On the other hand, with GraphQL this is not the case. GraphQL API allows you to define the data you need and returns that only - no more, no less. This avoids a lot of unwanted data and the returned output is much smaller, thereby improving performance.&lt;/p&gt;

&lt;p&gt;An example of a GraphQL query is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  restaurantDishes(limit: 3) {
   dish_name
   price
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;data&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;restaurantDishes&lt;/span&gt;&lt;span class="dl"&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dish_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Apple Pie&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$9.83&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dish_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fried Chicken&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$29.99&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dish_name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cheeseburger&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$1.39&lt;/span&gt;&lt;span class="dl"&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;&lt;strong&gt;3. Schema and Type safety&lt;/strong&gt;&lt;br&gt;
GraphQL uses its own type system - &lt;a href="https://www.howtographql.com/basics/2-core-concepts/#:~:text=The%20Schema%20Definition%20Language%20(SDL,type%20Person%20%7B%20name:%20String!)" rel="noopener noreferrer"&gt;SDL&lt;/a&gt;(Schema Definition Language). A schema defines how a client can access resources from the server. &lt;/p&gt;

&lt;p&gt;This helps in catching errors easily while allowing the front-end and backend teams to work independently. GraphQL also allows you to stitch multiple schemas together so that a client can access data from different sources. &lt;/p&gt;

&lt;p&gt;For REST, this would mean making multiple API calls at different endpoints. This can result in more computational power and lower efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Speed of Development&lt;/strong&gt;&lt;br&gt;
Because GraphQL allows you to specify the query on the fly, front-end developers can adjust response requirements without backend involvement. &lt;br&gt;
Same is not true for REST though. REST APIs are structured according to endpoints and the data they return (e.g: &lt;code&gt;/price&lt;/code&gt;, &lt;code&gt;/ingredients&lt;/code&gt;, &lt;code&gt;/dishnames&lt;/code&gt;, etc). To adjust response requirements, one may need to fetch data from different endpoints and be prone to the classic problem of underfetching / overfetching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problems with GraphQL
&lt;/h2&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%2F2fl472h8d06gk5yrngjp.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%2F2fl472h8d06gk5yrngjp.png" alt="Problems with GraphQ" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Learning curve&lt;/strong&gt;&lt;br&gt;
Despite its many advantages, GraphQL falls short on REST because of simplicity. If you're new to development, REST is much easier to learn between the two having no restrictions on what your resource can consume or return.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. HTTP Caching&lt;/strong&gt;&lt;br&gt;
In REST, the URLs for the requests are different (&lt;code&gt;GET&lt;/code&gt;, &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;PUT&lt;/code&gt;, &lt;code&gt;PATCH&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;). This allows you to get a globally unique identifier for an object which helps you to implement an HTTP cache. This way, you can easily identify if two resources are same while also allowing you to avoid fetching the same resource twice.&lt;/p&gt;

&lt;p&gt;Meanwhile, in GraphQL, you use a single endpoint. For non-mutable queries, the developer has to ensure that caching is setup manually and the correct key is being used to inspect the body elements. There are tools that cover GraphQL semantics, but most of them lack in things like mobile and browser caching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Resource attacks&lt;/strong&gt;&lt;br&gt;
The most talked benefit of GraphQL allowing clients to query only the data they need comes with a huge drawback - performance. Open APIs used in an app do not allow you to control 3rd party client query behaviour. This can results in expensive join queries which can severely effect server performance, or worse, result in a DDoS attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Reporting (Errors)&lt;/strong&gt;&lt;br&gt;
As REST follows the HTTP spec, it allows many tools to probe a URL endpoint and study error messages if not OK. In GraphQL, these tools cannot help. GraphQL client errors always return a &lt;code&gt;200 OK&lt;/code&gt; status response with a &lt;code&gt;Something went wrong message&lt;/code&gt;. As this is superficial, it is very difficult to handle and monitor errors on GraphQL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices to follow while designing your next API
&lt;/h2&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%2Fy1zesbm3jewd5old8bsp.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%2Fy1zesbm3jewd5old8bsp.png" alt="Best practices to follow while designing your next API" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;1. Security first&lt;/strong&gt;&lt;br&gt;
All client - server communications should be protected by SSL / TLS. Your API should communicate over a secure channel thereby restricting users to only access information they requested and nothing more. Moving a step further, you can enforce a roles check for an admin role or have granular roles depending on your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Use nouns for endpoint paths&lt;/strong&gt;&lt;br&gt;
HTTP request methods are made up of verbs ( &lt;code&gt;GET&lt;/code&gt;, &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;PUT&lt;/code&gt;, &lt;code&gt;PATCH&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;). Adding another verb as an endpoint path will make your request difficult to comprehend. The action of the request should be defined by the HTTP method while your path can define the resource on which the action is being performed. Eg: You can make your routes self explanatory like &lt;code&gt;GET/flights&lt;/code&gt; gets all the flights, &lt;code&gt;DELETE/flight/:id&lt;/code&gt; is for deleting the flight matching the given &lt;code&gt;id&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Control your data&lt;/strong&gt;&lt;br&gt;
As you scale, your data sets can get very large. Depending on the request, you might end up returning a large amount of data in a single request that will slow down your network and crash your systems. This is where filtering comes in. Allow data to be filtered and paginated so that in case of such a request, we return only a finite number of results at a time. This also helps in increasing performance and reducing server costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Versioning&lt;/strong&gt; &lt;br&gt;
Especially useful in public API settings, versioning allows your users to transition overtime to upgraded versions of your API changes (goodUX). Like most apps, you can follow the semantic version for versioning - eg: &lt;code&gt;1.0.4&lt;/code&gt; indicates major version 1 and the 4th patch. This allows your users to keep using the older version in case they are not ready to upgrade or access the new release with the latest features. Also, this helps to avoid failure in third party apps that can still be accessing the older version of the API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Caching&lt;/strong&gt;&lt;br&gt;
We learned earlier in the article what caching is and how it helps to improve performance of your system. However, there can be times when the data gets outdated. This creates issues in testing as we continue to see old data. To resolve this, you can use a caching solution like &lt;a href="https://aws.amazon.com/redis/#:~:text=ElastiCache%20for%20Redis-,Amazon%20ElastiCache%20for%20Redis%20is%20a%20fully%20managed%20caching%20service,primary%20databases%20and%20data%20stores." rel="noopener noreferrer"&gt;Redis&lt;/a&gt; or implement in-memory caching. This way, as your needs change, you can change the way your data is being cached.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Configuring your request and responses headers&lt;/strong&gt;&lt;br&gt;
This helps to specify information about the request being made. In return, it also specifies information on how a response was generated. Apart from this, you can also configure timeout settings to retry requests if they fail due to server or network errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: Which API type will make the most sense for my application?
&lt;/h2&gt;

&lt;p&gt;Honestly speaking, it depends on your application. Many times, instead of debating over REST vs GraphQL, a basic API for a basic site with focused endpoints would suffice (releasing the developer from unnecessary complexities).&lt;/p&gt;

&lt;p&gt;That being said, REST is widely used for a simple reason: simplicity. Ground rule is if you don't have to combine data types in custom ways or are flexible in the kind of data your request returns, it's easier to keep things simple with REST. With REST, you can target a wide range of apps and users in the simplest way possible, especially when you don't know who or how your API is going to be consumed.&lt;/p&gt;

&lt;p&gt;Meanwhile, GraphQL comes in the picture when you realise that you'd need multiple REST queries to perform a certain action. Instead of creating 10000 different endpoints to fetch minimised versions of your data set, use GraphQL to define what and how much of the data you need.&lt;/p&gt;

&lt;p&gt;Ultimately, it all boils down to understanding your product and code architecture. As a closure, a well designed API is much important over the type of API that you end up using.&lt;/p&gt;




&lt;p&gt;Hey there👋! &lt;/p&gt;

&lt;p&gt;My name is Mufassir and I work as a Product Manager at a dev tool startup.&lt;/p&gt;

&lt;p&gt;Thank you so much for reading till the end 💙. For reach-outs, I’m available on &lt;a href="https://www.linkedin.com/in/mufassirkazi/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; or feel free to follow me on &lt;a href="https://twitter.com/mufassirkazi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>watercooler</category>
      <category>marketing</category>
    </item>
  </channel>
</rss>
