<?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: Ali Osaid</title>
    <description>The latest articles on DEV Community by Ali Osaid (@aliosaid01).</description>
    <link>https://dev.to/aliosaid01</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%2F965122%2F3f353069-d51a-4838-992b-af8730f8fa91.jpeg</url>
      <title>DEV Community: Ali Osaid</title>
      <link>https://dev.to/aliosaid01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aliosaid01"/>
    <language>en</language>
    <item>
      <title>In App Purchase ( Node + React-Native</title>
      <dc:creator>Ali Osaid</dc:creator>
      <pubDate>Mon, 09 Dec 2024 17:55:30 +0000</pubDate>
      <link>https://dev.to/aliosaid01/in-app-purchase-node-react-native-256k</link>
      <guid>https://dev.to/aliosaid01/in-app-purchase-node-react-native-256k</guid>
      <description>&lt;p&gt;&lt;strong&gt;A Complete Guide to Setting Up In-App Purchases with Google Cloud Platform and Apple App Store&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this blog post, we will cover the following topics to help you implement In-App Purchases (IAP) seamlessly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How to set up IAP for iOS and Android.&lt;/li&gt;
&lt;li&gt;Adding products for subscriptions.&lt;/li&gt;
&lt;li&gt;Fetching subscriptions in a React Native application.&lt;/li&gt;
&lt;li&gt;Verifying subscription tokens in the backend.&lt;/li&gt;
&lt;li&gt;Setting up webhooks for iOS and Android.&lt;/li&gt;
&lt;li&gt;Understanding the different types of server notifications.&lt;/li&gt;
&lt;li&gt;Handling various notification types effectively.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;How to set up IAP for iOS and Android&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the Google Cloud Platform (GCP) and navigate to API &amp;amp; Services. You will see an interface like this:&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%2F23bfyhqw5758w395qd1h.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%2F23bfyhqw5758w395qd1h.png" alt="Image description" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on the Enable API &amp;amp; Services button. This will take you to a new screen with a search bar. Type "Google Cloud APIs" in the search bar and enable it.&lt;/p&gt;

&lt;p&gt;Next, navigate to the Google Play Console.&lt;/p&gt;

&lt;p&gt;However, you cannot add products or subscriptions until you enable billing. To do this, push a build to the Google Play Console first.&lt;/p&gt;

&lt;p&gt;Add the following dependency to your build.gradle file:&lt;br&gt;
&lt;code&gt;implementation 'com.android.billingclient:billing:5.0.0'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Also, add the following permission to your AndroidManifest.xml file:&lt;br&gt;
&lt;code&gt;&amp;lt;uses-permission android:name="com.android.vending.BILLING" /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;n the Google Play Console, select your app. Then, on the left sidebar, you will see the Monetize and Play tab. Click on it to open a dropdown menu.&lt;/p&gt;

&lt;p&gt;From the dropdown, select the Products tab, which will further expand. In this expanded menu, you will see the Subscription 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%2Fiwz6lkwaxbiukryygqck.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%2Fiwz6lkwaxbiukryygqck.png" alt="Image description" width="800" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, you can assign a unique product ID and name, such as Gold or Silver Subscription.&lt;/p&gt;

&lt;p&gt;Next, you can add a Base Plan. For example, a Gold Subscription can be set up for daily, monthly, or yearly renewals. The Base Plan allows you to define details like auto-renewal, prepaid options, and pricing. It’s a simple and straightforward process to configure.&lt;/p&gt;

&lt;p&gt;After setting this up, you’ll need to install the required library:&lt;br&gt;
npm install react-native-iap&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as RNIap from 'react-native-iap';
...
try {
  await RNIap.prepare();
  const products = await RNIap.getProducts(itemSkus);
   setProducts(products) 
} catch(error) {
  console.log("ERROR -&amp;gt;",error);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { createContext, useContext, useEffect, useState, ReactNode } from 'react';
import {
  initConnection,
  endConnection,
  getSubscriptions,
  purchaseUpdatedListener,
  purchaseErrorListener,
  Subscription,
} from 'react-native-iap';
import { Platform } from 'react-native';
import { EmitterSubscription } from 'react-native';

// Define the context type for better typing
interface IAPContextType {
  subscriptions: Subscription[];
  isConnected: boolean;
  fetchSubscriptions: () =&amp;gt; void; // Add fetchSubscriptions function to the context
}

const IAPContext = createContext&amp;lt;IAPContextType&amp;gt;({
  subscriptions: [],
  isConnected: false,
  fetchSubscriptions: () =&amp;gt; {},
});

// Define props type for the provider
interface IAPProviderProps {
  children: ReactNode;
}

export const IAPProvider = ({ children }: IAPProviderProps) =&amp;gt; {
  const [subscriptions, setSubscriptions] = useState&amp;lt;Subscription[]&amp;gt;([]);
  const [isConnected, setIsConnected] = useState(false);
  const [purchaseListener, setPurchaseListener] = useState&amp;lt;EmitterSubscription | null&amp;gt;(null);
  const [errorListener, setErrorListener] = useState&amp;lt;EmitterSubscription | null&amp;gt;(null);

  // Define SKU lists
  const androidSKUs = ['GOLD', 'SIKVER']; // Replace with your Android product IDs
  const iosSKUs = ['SILVER', 'GOLD']; // Replace with your iOS product IDs

  // Initialize IAP connection and fetch subscriptions
  const initializeIAP = async () =&amp;gt; {
    try {
      const connected = await initConnection();
      setIsConnected(connected);
      if (connected) {
        console.log('IAP Connected');
        fetchSubscriptions();
      } else {
        console.error('IAP Connection Failed');
      }
    } catch (error) {
      console.error('IAP Initialization Error:', error);
    }
  };

  // Fetch subscriptions based on platform (Android/iOS)
  const fetchSubscriptions = async () =&amp;gt; {
    try {
      const skus = Platform.OS === 'android' ? androidSKUs : iosSKUs;
      const products = await getSubscriptions({ skus });
      setSubscriptions(products);
      console.log('Fetched Subscriptions:', products);
    } catch (error) {
      console.error('Error fetching subscriptions:', error);
    }
  };

  // Set up purchase and error listeners
  useEffect(() =&amp;gt; {
    initializeIAP();

    const purchaseSub = purchaseUpdatedListener((purchase) =&amp;gt; {
      console.log('Purchase Updated:', purchase);
      // Handle purchase success
    });

    const errorSub = purchaseErrorListener((error) =&amp;gt; {
      console.error('Purchase Error:', error);
      // Handle purchase error
    });

    setPurchaseListener(purchaseSub);
    setErrorListener(errorSub);

    // Cleanup listeners and close connection when the component unmounts
    return () =&amp;gt; {
      console.log('Cleaning up IAP connection...');
      endConnection();
      purchaseListener?.remove();
      errorListener?.remove();
    };
  }, [purchaseListener, errorListener]);

  return (
    &amp;lt;IAPContext.Provider value={{ subscriptions, isConnected, fetchSubscriptions }}&amp;gt;
      {children}
    &amp;lt;/IAPContext.Provider&amp;gt;
  );
};

// Custom hook for accessing IAP context
export const useIAP = () =&amp;gt; useContext(IAPContext);

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

&lt;/div&gt;



&lt;p&gt;Now create susbcription Screen&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { finishTransaction, requestSubscription, SubscriptionPurchase } from 'react-native-iap';

const handleSubscriptionSelect = async (
    productId: string,
    offerToken: string,
  ) =&amp;gt; {
    try {
      // eslint-disable-next-line prettier/prettier
      console.log(`Subscribing to Product: ${productId}, with OfferToken: ${offerToken}`);
      console.log('Attempting subscription:', {
        sku: productId,
        subscriptionOffers: [{offerToken}],
      });
      const purchase = await requestSubscription({
        sku: productId,
        subscriptionOffers: [{sku: productId, offerToken}],
      });
      console.log('Purchase successful:', purchase);
      // Finish the transaction to acknowledge the purchase
      if (purchase) {
        if (Array.isArray(purchase)) {
          for (const p of purchase) {
            await finishTransaction({purchase: p});
          }
        } else {
          await finishTransaction({purchase});
        }
      } else {
        throw new Error('Purchase was not successful.');
      }
      Alert.alert('Success', 'You have successfully subscribed!');
    } catch (error: any) {
      console.error('Purchase error:', error);
      Alert.alert(
        'Purchase Failed',
        error.message || 'An unknown error occurred.',
      );
    }
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it for the code part! You should now be able to see the subscription you added in the Google Play Console.&lt;/p&gt;

&lt;p&gt;If the products aren’t fetched, it’s likely due to a configuration issue. On iOS or Android, the most common causes are:&lt;/p&gt;

&lt;p&gt;Incorrect configuration.&lt;br&gt;
Testing on an emulator instead of a physical device (this issue is mostly occur on iOS).&lt;/p&gt;

&lt;p&gt;Let’s configure the webhook to listen for IAP events on the backend.&lt;/p&gt;

&lt;p&gt;First, navigate back to the GCP console. Go to Pub/Sub, where you’ll need to create a topic.&lt;/p&gt;

&lt;p&gt;After creating a topic&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%2F4hu2uspl5b4s79pjzits.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%2F4hu2uspl5b4s79pjzits.png" alt="Image description" width="800" height="42"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, click on the topic and create a subscription. After creating the subscription, edit it and change the type from Push to Pull.&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%2Fkpfuh0jug2ehk4auctab.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%2Fkpfuh0jug2ehk4auctab.png" alt="Image description" width="800" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you need to specify the URL where you will receive the webhook events.&lt;/p&gt;

&lt;p&gt;Make sure to check the Retry Policy at the bottom of the page. Set it to Backup with a specific interval. This will prevent the webhook event from being re-sent repeatedly in case of failure. For development purposes, we don't want it to resend the event continually, so we'll enable this policy in production.&lt;/p&gt;

&lt;p&gt;After this, go to the Google Play Console. In the Monetize and Play tab, you will see the Monetization Setup section. Click on it, and copy the topic name you provided in GCP. Paste it into the input field.&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%2F76yhgdbi6ulwin8pjxo6.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%2F76yhgdbi6ulwin8pjxo6.png" alt="Image description" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, push your code and test the server notifications. You may encounter an error that your topic is incorrect. This usually happens if you've missed a step in the setup process. To resolve this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go back to Google Cloud Platform (GCP) and navigate to the Pub/Sub section.&lt;/li&gt;
&lt;li&gt;Find the topic you created earlier and click on it.&lt;/li&gt;
&lt;li&gt;At the top-right corner of the topic details page, you will see three dots. Click on them to open a dropdown menu.&lt;/li&gt;
&lt;li&gt;Select View Permissions from the dropdown.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, create a new permission for the Pub/Sub Publisher role:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add the following service account to the permissions list
&lt;code&gt;google-play-developer-notifications@system.gserviceaccount.com&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Test Notifications in Google Play Console&lt;br&gt;
Once you've updated the permissions, go back to the Google Play Console and test the server notification again. If the notification keeps coming in without stopping, it means the system is still waiting for an acknowledgment.&lt;/p&gt;

&lt;p&gt;Acknowledge the Webhook&lt;br&gt;
To confirm receipt of the webhook event and stop the repeated notifications, you need to respond with a 200 OK status code. This ensures that the event was successfully received and processed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface SubscriptionNotification {
  version: string; 
  notificationType: number; 
  purchaseToken: string;  
  subscriptionId: string; 
}

export interface AndroidSubscriptionWebhookEvent {
  version: string; 
  packageName: string; 
  eventTimeMillis: string; 
  subscriptionNotification:SubscriptionNotification
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The data we get from android and IOS webhook server notification is encrpy so we need to decode it&lt;/p&gt;

&lt;p&gt;create a method to decode the data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
  decodeJWT = (jwt: string): AndroidSubscriptionWebhookEvent =&amp;gt; {
    return JSON.parse(Buffer.from(jwt, "base64").toString("utf-8"));
  };

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

&lt;/div&gt;



&lt;p&gt;this is the different type of notification that you most likly will interact with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export enum WEBHOOK_ANDROID {
  "renewed" = 2,
  "cancel" = 3,
  "purchased" = 4,
  "revoked" = 12,
  "expired" = 13
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now you can implement your logic further according to your DB structure &lt;/p&gt;

&lt;p&gt;but also you have to verify the Receipt that purchase in the FE for that you have to make an end point in Backend&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { applicationId, subscriptionId, purchaseToken, platform = PLATFORM_TYPE.ANDROID} = req.body;

 const auth = new google.auth.GoogleAuth({
        keyFile: "./googleapis.json",
        scopes: ["https://www.googleapis.com/auth/androidpublisher"],
    });

    const androidPublisher = google.androidpublisher({
        auth,
        version: "v3",
        params:{sandbox:true}  // make it false in production
    });

    try {
        const response = await androidPublisher.purchases.subscriptions.get({
            packageName,
            subscriptionId,
            token,
        });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this will verify the subscription and then you can save the data into DB&lt;/p&gt;

&lt;p&gt;Let's cover the IOS side&lt;/p&gt;

&lt;p&gt;Setup your in app products for ios in itunesconnect.&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%2Fl8lupt3agth794bzkmuc.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%2Fl8lupt3agth794bzkmuc.png" alt="Image description" width="670" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You need to complete the Agreements, Tax and Bankings.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add In-App Purchases in Features tab. Check that your product’s status is Ready to Submit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check your xcode setting and make In-App Purchase available.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, you’re done with ios side configuration&lt;/p&gt;

&lt;p&gt;use the same package and fetch the subscription products but the payload is different from android and ios so handle it accordingly &lt;/p&gt;

&lt;p&gt;FOR IOS Webhook&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const base64EncodedJWT = req.body.signedPayload;
        if (!base64EncodedJWT) return res.status(200).json({ message: "signedPayload is missing from the request body" });

        const payload = decodeJWT(base64EncodedJWT);
        let renewalInfo;
        let transactionInfo;

        if (payload?.data?.signedRenewalInfo) renewalInfo = decodeJWT(payload.data.signedRenewalInfo);
        if (payload?.data?.signedTransactionInfo) transactionInfo = decodeJWT(payload.data.signedTransactionInfo);

        console.log("renewalInfo -&amp;gt;",renewalInfo)
        console.log("transactionInfo -&amp;gt;",transactionInfo)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you need to decode the payload as well you can use the same method that we write earlier to decode the object of server notification of android&lt;/p&gt;

&lt;p&gt;DID_RENEW&lt;br&gt;
SUBSCRIBED&lt;br&gt;
CANCEL&lt;br&gt;
EXPIRED&lt;/p&gt;

&lt;p&gt;Handle these subscription according to your DB structure &lt;/p&gt;

&lt;p&gt;if you like the post do follow me on Github&lt;br&gt;
&lt;a href="https://github.com/ali-osaid01" rel="noopener noreferrer"&gt;https://github.com/ali-osaid01&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>react</category>
      <category>reactnative</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Flutter &gt; react native</title>
      <dc:creator>Ali Osaid</dc:creator>
      <pubDate>Fri, 11 Aug 2023 18:23:45 +0000</pubDate>
      <link>https://dev.to/aliosaid01/flutter-react-native-5bb</link>
      <guid>https://dev.to/aliosaid01/flutter-react-native-5bb</guid>
      <description>&lt;p&gt;Just started learning flutter and it's amazing all the pre build widget  make the development so fast and easy 😉&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>programming</category>
    </item>
    <item>
      <title>HTTP methods in RESTful API development</title>
      <dc:creator>Ali Osaid</dc:creator>
      <pubDate>Mon, 14 Nov 2022 16:07:57 +0000</pubDate>
      <link>https://dev.to/aliosaid01/http-methods-in-restful-api-development-3ega</link>
      <guid>https://dev.to/aliosaid01/http-methods-in-restful-api-development-3ega</guid>
      <description>&lt;p&gt;so today topic is API;&lt;br&gt;
API is Application programming interface we have some 4 most used method &lt;br&gt;
GET&lt;br&gt;
POST&lt;br&gt;
PUT&lt;br&gt;
DELETE&lt;/p&gt;

&lt;p&gt;before we jump into GET,POST,PUT,DELETE, method lets talk about  is  why we need to use API what is the main reason &lt;/p&gt;

&lt;p&gt;well our website have front-end and back-end we cant connect our front-end to our database. This is where back-end comes  where we will create logic for our front-end side so we can send data to our database and recall it when needed &lt;/p&gt;

&lt;p&gt;we make API to connect our front-end with our database &lt;/p&gt;

&lt;p&gt;GET &lt;br&gt;
This method is use to get all the data that is currently in our database we can show this data to our front-end by using fetch method or a library Axios that help us fetch data from API&lt;/p&gt;

&lt;p&gt;POST&lt;br&gt;
This method is use to send data from our front-end to our database it could be number string picture or anything we can also use schema if we using  monogoose  to make sure the correct form of data is been send to our backend&lt;/p&gt;

&lt;p&gt;PUT&lt;br&gt;
This method is used to update the data for example we need to a list of product because there price has been change &lt;/p&gt;

&lt;p&gt;DELTE&lt;br&gt;
you can tell from the name what this method going to do well yeah its going to delate the data that has been store in our backend &lt;/p&gt;

&lt;p&gt;this is just a basic knowledge what is happening in backend but believe me there is a lot to learn  &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>node</category>
      <category>mongodb</category>
    </item>
    <item>
      <title>let and Var difference In JavaScript</title>
      <dc:creator>Ali Osaid</dc:creator>
      <pubDate>Sun, 06 Nov 2022 15:01:52 +0000</pubDate>
      <link>https://dev.to/aliosaid01/let-and-var-difference-in-javascript-5e6p</link>
      <guid>https://dev.to/aliosaid01/let-and-var-difference-in-javascript-5e6p</guid>
      <description>&lt;p&gt;Lets talk about the difference between Var and let and later on we will talk about what should we use in our JavaScript projects&lt;/p&gt;

&lt;p&gt;So Let and Var both use for declaration of variable but there is some difference between them &lt;/p&gt;

&lt;p&gt;Let allow us to declare a variable that has limit to the scope of a block statement unlike Var which declares a variable globally or locally to the entire Function;&lt;/p&gt;

&lt;p&gt;Now the question is what should we use well we should always use Const if we know the variable value not going to change else we can use Let for declaration ;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>First Blog</title>
      <dc:creator>Ali Osaid</dc:creator>
      <pubDate>Fri, 04 Nov 2022 17:09:33 +0000</pubDate>
      <link>https://dev.to/aliosaid01/first-blog-m3</link>
      <guid>https://dev.to/aliosaid01/first-blog-m3</guid>
      <description>&lt;p&gt;HI GUYS, I'm a 19 years old self-taught developer!&lt;br&gt;
so when did I make my mind for programming well since I was a kid I always wanted to know how games work how internet work so I kept my focus in that but never understand anything but when I was 15 I start digging in this and I learn my first language it was JavaScript and its framework and libraries like react JS,Next js, Express JS Node Js and I become a web developer and learn C and C++ in my college year and  I always have a lot of passion for programming and I always wanted to learn new things and work on new technology  &lt;/p&gt;

&lt;p&gt;I'm really happy to look forward what comes next for me making new friend and helping other learning new technology :)&lt;/p&gt;

&lt;p&gt;Ali Osaid&lt;br&gt;
Full stack Developer;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
