<?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: Surhid Amatya</title>
    <description>The latest articles on DEV Community by Surhid Amatya (@surhidamatya).</description>
    <link>https://dev.to/surhidamatya</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%2F379207%2Fcfe00353-72cc-4d52-acb0-59b524814aa6.png</url>
      <title>DEV Community: Surhid Amatya</title>
      <link>https://dev.to/surhidamatya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/surhidamatya"/>
    <language>en</language>
    <item>
      <title>Implementing Object-Oriented Programming (OOP) in Flutter and Dart</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Fri, 30 Jan 2026 07:34:14 +0000</pubDate>
      <link>https://dev.to/surhidamatya/implementing-object-oriented-programming-oop-in-flutter-and-dart-1kb6</link>
      <guid>https://dev.to/surhidamatya/implementing-object-oriented-programming-oop-in-flutter-and-dart-1kb6</guid>
      <description>&lt;p&gt;If you are in Programming field and have done programming then in your travel you must have googled OOP and it's implemnetaiton in your respective language, right? Found one example in counter, other in login and similar other in other different ways. While exploring these examples did you ever felt disconnected and thought if only it answered a single query I had in my mind.&lt;/p&gt;

&lt;p&gt;I had that thought if only it took a single thing and connected using different OOP principle. In this blog I am trying to solve same query of mine. While saying this to understand this blog you must have Basic understanding of OOP concepts (classes, inheritance, interfaces, and polymorphism) and familiarity with running Flutter apps.&lt;/p&gt;

&lt;p&gt;When you build Flutter apps, you are already using OOP whether you realize it or not. Widgets are classes. State is an object. Your app is a forest of interacting objects quietly doing their jobs.&lt;/p&gt;

&lt;p&gt;OOP is not about writing more classes. It is about modeling your app in a way that matches how the problem behaves in the real world. When done well, the code reads like a story instead of a puzzle.&lt;/p&gt;

&lt;p&gt;Object Oriented Programming is built on four core pillars:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inheritance&lt;/li&gt;
&lt;li&gt;Encapsulation&lt;/li&gt;
&lt;li&gt;Polymorphism&lt;/li&gt;
&lt;li&gt;Abstraction&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Today, we will break each one down and show how they show up naturally in Flutter and Dart code.&lt;/p&gt;

&lt;p&gt;When people hear “&lt;strong&gt;OOP&lt;/strong&gt;”, they think of service layers and interfaces. Flutter quietly teaches OOP every day through widgets and state.&lt;/p&gt;

&lt;p&gt;Let's put on our "OOP Glasses" and look at the code you write every day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;: Inheritance lets one class acquire the properties and methods of another class.&lt;/p&gt;

&lt;p&gt;Every time you make an StatelessWidget:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MyButton extends StatelessWidget {
  // ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You are using Inheritance. What Happens When You &lt;strong&gt;&lt;em&gt;Ctrl + Click&lt;/em&gt;&lt;/strong&gt; &lt;code&gt;StatelessWidget&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you Ctrl (or Cmd) + click on StatelessWidget, you don’t see magic. You see code.&lt;/p&gt;

&lt;p&gt;Simplified, it looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;abstract class StatelessWidget extends Widget {
  const StatelessWidget({Key? key}) : super(key: key);

  @protected
  Widget build(BuildContext context);

  @override
  StatelessElement createElement() =&amp;gt; StatelessElement(this);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Already, several things are happening. What Your Widget Inherits Automatically. When you extend StatelessWidget, Flutter asks you for exactly one thing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Widget build(BuildContext context);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it. Now flutter handles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;layout&lt;/li&gt;
&lt;li&gt;constraints&lt;/li&gt;
&lt;li&gt;repainting&lt;/li&gt;
&lt;li&gt;diffing&lt;/li&gt;
&lt;li&gt;scheduling&lt;/li&gt;
&lt;li&gt;performance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You will only describe what the UI should look like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt;: The definition of encapsulation is "the action of enclosing something in or as if in a capsule". Removing access to parts of your code and making things private is exactly what Encapsulation is all about (often times, people refer to it as data hiding).&lt;/p&gt;

&lt;p&gt;In a simple mean each object in your code should control its own state. State is the current "snapshot" of your object. The keys, the methods on your object, Boolean properties and so on. If you were to reset a Boolean or delete a key from the object, they're all changes to your state.&lt;/p&gt;

&lt;p&gt;Limit what pieces of your code can access. Make more things inaccessible, if they aren't needed.&lt;/p&gt;

&lt;p&gt;We’ve all written a basic counter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class _CounterState extends State&amp;lt;CounterWidget&amp;gt; {
  // That little underscore (_) is doing heavy lifting
  int _count = 0; 

  void increment() {
    setState(() {
      _count++;
    });
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That underscore _ isn't just a naming convention; it’s a security guard. It locks _count inside this specific class. No other file in your project can reach in and mess with that number.&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;Encapsulation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you made _count public, some other random widget might accidentally reset it to zero. By hiding the data and only exposing a function (increment) to change it, you’ve made your code crash-proof.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Polymorphism&lt;/strong&gt;: Polymorphism means "the condition of occurring in several different forms." That's exactly what the fourth and final pillar is concerned with – types in the same inheritance chains being able to do different things.&lt;/p&gt;

&lt;p&gt;If you have used inheritance correctly you can now reliably use parents like their children. When two types share an inheritance chain, they can be used interchangeably with no errors or assertions in your code.&lt;/p&gt;

&lt;p&gt;Have you noticed that Text, Container, Row, and Image all look completely different, but you can stick any of them into the child property of a Center widget?&lt;/p&gt;

&lt;p&gt;That’s Polymorphism in action. Now, look at how this exact same logic runs your UI. You do this every time you use a Column.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// POLYMORPHISM IN FLUTTER:
// The Column expects a List&amp;lt;Widget&amp;gt;. 
// It doesn't care if they are texts, icons, or complex containers.
Column(
  children: [
    // Form 1: A Text Widget
    Text("Hello World"), 

    // Form 2: A Container Widget
    Container(height: 50, color: Colors.red),

    // Form 3: A Custom Button Widget
    MyCustomButton(), 
  ],
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why this matters: The Column widget's code loops through that list and calls build() on every item.&lt;/p&gt;

&lt;p&gt;It calls &lt;code&gt;build()&lt;/code&gt; on Text -&amp;gt; You get letters.&lt;/p&gt;

&lt;p&gt;It calls &lt;code&gt;build()&lt;/code&gt; on Container -&amp;gt; You get a red box.&lt;/p&gt;

&lt;p&gt;That is Polymorphism. One list, many forms, zero crashes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstraction&lt;/strong&gt;: To abstract something away means to hide away the implementation details inside something – sometimes a prototype, sometimes a function. So when you call the function you don't have to understand exactly what it is doing.&lt;/p&gt;

&lt;p&gt;If you had to understand every single function in a big codebase you would never code anything. It would take months to finish reading through it all.&lt;/p&gt;

&lt;p&gt;You can create a reusable, simple-to-understand, and easily modifiable codebase by abstracting away certain details.&lt;/p&gt;

&lt;p&gt;Imagine you write a widget that is composed of an icon. You force it to be a specific Icon class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class RigidCard extends StatelessWidget {
  // RIGID: This card allows ONLY an Icon.
  // It is composed of a concrete class.
  final Icon icon; 
  final String title;

  const RigidCard({required this.icon, required this.title});

  @override
  Widget build(BuildContext context) {
    return Card(
      child: Column(
        children: [
          icon, // We know exactly what this is.
          Text(title),
        ],
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why this fails: If tomorrow you want to put an Image or a Lottie Animation inside that card, you can't. The composition is too specific. You'd have to rewrite the class.&lt;/p&gt;

&lt;p&gt;Composition In Terms of Abstraction (Flexible)&lt;br&gt;
Now, let's use Abstraction (Widget) to define the "slot" for the composition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class FlexibleCard extends StatelessWidget {
  // ABSTRACT: This card allows ANY Widget.
  // It is composed of an abstraction.
  final Widget visual; 
  final String title;

  const FlexibleCard({required this.visual, required this.title});

  @override
  Widget build(BuildContext context) {
    return Card(
      child: Column(
        children: [
          visual, // We don't know what this is! It's just "a Widget".
          Text(title),
        ],
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, look at how the Composition changes based on the implementation:&lt;/p&gt;

&lt;p&gt;// Usage 1: Composed with an Icon&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FlexibleCard(
  visual: Icon(Icons.star), // Abstraction lets this fit
  title: "Favorites",
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;// Usage 2: Composed with an Image&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FlexibleCard(
  visual: Image.asset('assets/logo.png'), // Abstraction lets this fit too
  title: "Brand",
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;// Usage 3: Composed with a Switch&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FlexibleCard(
  visual: Switch(value: true, onChanged: (_) {}), // Even this fits!
  title: "Settings",
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the detail:&lt;br&gt;
&lt;em&gt;Composition&lt;/em&gt;: The FlexibleCard HAS-A visual element inside it. That is the structure.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Abstraction&lt;/em&gt;: The type of that element is Widget. Widget is the contract (the Abstraction). It says "I don't care if you are an image, text, or button, as long as you can paint yourself on the screen."&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Result&lt;/em&gt;: Because you used Composition in terms of Abstraction (holding a generic Widget instead of a specific Icon), your FlexibleCard is now infinite. You never have to touch its code again, no matter what new design requirements come in.&lt;/p&gt;

&lt;p&gt;This is the heart of Flutter: Build slots (Abstraction) and fill them with blocks (Composition).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
You don't need to read a dusty textbook to understand Object-Oriented Programming.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Inheritance&lt;/em&gt;&lt;/strong&gt; is why you extend StatelessWidget.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Encapsulation&lt;/em&gt;&lt;/strong&gt; is why you use _ in your State variables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Polymorphism&lt;/em&gt;&lt;/strong&gt; is why every widget has a build() method.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Abstraction&lt;/em&gt;&lt;/strong&gt; is why you nest widgets inside widgets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You aren't just "building screens." You are orchestrating a conversation between objects. And the best part? You were already doing it.&lt;/p&gt;

&lt;p&gt;Flutter didn’t invent a new paradigm. It applied object-oriented principles with restraint and taste.&lt;/p&gt;

&lt;p&gt;If you align your services, state, and business logic with the same rules that Flutter uses internally, your app starts to feel coherent rather than stitched together.&lt;/p&gt;

&lt;p&gt;You don’t need to learn OOP for Flutter. You need to realize that Flutter has been teaching you all along.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>From memory to machines: how notifications actually work</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Mon, 19 Jan 2026 07:09:09 +0000</pubDate>
      <link>https://dev.to/surhidamatya/from-memory-to-machines-how-notifications-actually-work-1f75</link>
      <guid>https://dev.to/surhidamatya/from-memory-to-machines-how-notifications-actually-work-1f75</guid>
      <description>&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%2F85fd2zmsx0tppf6owjoc.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%2F85fd2zmsx0tppf6owjoc.png" alt=" " width="800" height="563"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/surhidamatya/notifications-are-not-just-messages-they-are-memory-triggers-2968"&gt;Here we talked about the Notification.&lt;/a&gt;. Now let’s connect that human idea to the system behind it.&lt;/p&gt;

&lt;p&gt;Marketing and engineering look at notifications very differently.&lt;/p&gt;

&lt;p&gt;How marketing thinks&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We want to send messages.&lt;/li&gt;
&lt;li&gt;We want people to remember us.&lt;/li&gt;
&lt;li&gt;We want them to come back.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How engineering thinks&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We need reliability.&lt;/li&gt;
&lt;li&gt;We need scale.&lt;/li&gt;
&lt;li&gt;We need control.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both are right. Both are incomplete alone.&lt;/p&gt;

&lt;p&gt;A notification system exists to make them meet in the middle. The real flow, explained simply&lt;/p&gt;

&lt;p&gt;Let’s use a food delivery example. You place an order.&lt;/p&gt;

&lt;p&gt;What happens next?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`[ Order Placed ]
       |
       v
[ Notification Service ]`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The order service does not send a push directly. It only says:&lt;br&gt;
“Something happened.”&lt;/p&gt;

&lt;p&gt;The brain: Notification Service&lt;/p&gt;

&lt;p&gt;The Notification Service is like a smart receptionist. Before sending anything, it asks questions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Notification Service ]
        |
        |-- Is the user logged in?
        |-- Do they allow notifications?
        |-- Have we sent too many today?
        |-- What device are they using?
        |-- Push? Email? SMS?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is where marketing intent meets engineering rules.&lt;/p&gt;

&lt;p&gt;Marketing says: “Send an update.”&lt;/p&gt;

&lt;p&gt;Engineering asks: “To whom, how, and safely?”&lt;/p&gt;

&lt;p&gt;Giving the message a human voice. Once the system decides to send, it prepares the message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Template ]
   |
   v
"Your order is on the way"

[ Personalization ]
   |
   v
"Hi Ram, your order is on the way"

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

&lt;/div&gt;



&lt;p&gt;Without this step, notifications feel robotic. With it, they feel personal.&lt;/p&gt;

&lt;p&gt;Just like calling someone by name at the door. &lt;/p&gt;

&lt;p&gt;Delivery workers (the invisible heroes). Now the message needs to reach the user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Workers ]
   |
   |-- Push (APNS / FCM)
   |-- Email (SMTP)
   |-- SMS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Workers are like delivery people.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If one road is blocked, they retry.&lt;/li&gt;
&lt;li&gt;If a service is slow, they wait.&lt;/li&gt;
&lt;li&gt;If something fails, they queue again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is where trust is built. Closing the loop: learning from users. After delivery, the system watches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ User ]
   |
   |-- Opened?
   |-- Clicked?
   |-- Ignored?
   |-- Disabled notifications?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That data goes back.&lt;/p&gt;

&lt;p&gt;Now:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Marketing learns what people care about&lt;/li&gt;
&lt;li&gt;Engineering learns what breaks&lt;/li&gt;
&lt;li&gt;Product learns what matters&lt;/li&gt;
&lt;li&gt;Next notification becomes smarter.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Real-life version of this loop&lt;/p&gt;

&lt;p&gt;A laptop shop gives you a branded bag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Free Bag ]
     |
     v
[ Daily Use ]
     |
     v
[ Brand Recall ]
     |
     v
[ Return Customer ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same loop. Different medium.&lt;/p&gt;

&lt;p&gt;Why does this matter?&lt;/p&gt;

&lt;p&gt;Most teams build notifications like plumbing.&lt;/p&gt;

&lt;p&gt;Pipes in.&lt;br&gt;
Messages out.&lt;/p&gt;

&lt;p&gt;The best teams build notifications like memory design. They ask:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What should users remember?&lt;/li&gt;
&lt;li&gt;When should they remember it?&lt;/li&gt;
&lt;li&gt;How gently can we remind them?&lt;/li&gt;
&lt;li&gt;When does it become noise?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It’s not just architecture. It’s psychology turned into systems.&lt;/p&gt;

&lt;p&gt;Notifications are not just saying: “Something happened.”&lt;/p&gt;

&lt;p&gt;They are saying: “Remember us when it matters.”&lt;/p&gt;

&lt;p&gt;And when marketing and engineering agree on that, you stop sending messages and start building relationships.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Notifications Are Not Just Messages. They Are Memory Triggers.</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Mon, 12 Jan 2026 09:02:21 +0000</pubDate>
      <link>https://dev.to/surhidamatya/notifications-are-not-just-messages-they-are-memory-triggers-2968</link>
      <guid>https://dev.to/surhidamatya/notifications-are-not-just-messages-they-are-memory-triggers-2968</guid>
      <description>&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%2Fdc4q4vf6jx254gck3x3f.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%2Fdc4q4vf6jx254gck3x3f.png" alt=" " width="800" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we hear the word “notification”, we think of phones.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A popup.&lt;/li&gt;
&lt;li&gt;A vibration.&lt;/li&gt;
&lt;li&gt;A sound.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But notifications existed long before smartphones. They just looked different.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1: The doorbell&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When someone rings your doorbell, what are they really doing?&lt;/p&gt;

&lt;p&gt;They’re not just making noise. They’re saying:&lt;/p&gt;

&lt;p&gt;“I’m here. I want to meet you.”&lt;/p&gt;

&lt;p&gt;That bell is not information only. It’s a trigger.&lt;/p&gt;

&lt;p&gt;It moves you from whatever you were doing to the door. That’s exactly what a digital notification does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2: Pamphlets on the street&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Someone gives you a pamphlet about a new coaching center.&lt;/p&gt;

&lt;p&gt;Is that just paper?&lt;/p&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;It’s a notification in physical form. It’s saying:&lt;br&gt;
“There is a company called XYZ. They can help you with ABC.”&lt;/p&gt;

&lt;p&gt;You may not need them today. But when the need comes, that name suddenly feels familiar.&lt;/p&gt;

&lt;p&gt;That’s not just informing. That’s planting memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3: Pen and notebook from an institute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A training institute gives you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A pen with their logo&lt;/li&gt;
&lt;li&gt;A notebook with their name&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every time you write something, you see that brand. They are not interrupting you. They are living quietly in your memory.&lt;/p&gt;

&lt;p&gt;Later, when you think: “I need some technical training…”&lt;/p&gt;

&lt;p&gt;Their name appears in your head. That pen was a notification that lasted months.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 4: Laptop shop giving you a bag&lt;/strong&gt;&lt;br&gt;
You buy a laptop. The shop gives you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A laptop bag&lt;/li&gt;
&lt;li&gt;A mouse pad
With their branding.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every day you use it. You’re not reading an ad. But your brain keeps seeing that name.&lt;/p&gt;

&lt;p&gt;Next time you want accessories, repairs, or another laptop, you don’t search first.&lt;/p&gt;

&lt;p&gt;You remember first.&lt;/p&gt;

&lt;p&gt;That’s notification power without a screen.&lt;/p&gt;

&lt;p&gt;So what is a notification, really?&lt;/p&gt;

&lt;p&gt;A notification is not just: “Here is some information.”&lt;/p&gt;

&lt;p&gt;A real notification is: “Remember me when you need this.”&lt;/p&gt;

&lt;p&gt;In tech, we do it with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Push notifications&lt;/li&gt;
&lt;li&gt;Emails&lt;/li&gt;
&lt;li&gt;SMS&lt;/li&gt;
&lt;li&gt;In-app messages&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In real life, we do it with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Bells&lt;/li&gt;
&lt;li&gt;Pamphlets&lt;/li&gt;
&lt;li&gt;Branded pens&lt;/li&gt;
&lt;li&gt;Free bags&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Same idea. Different medium. Where marketing and engineering meet&lt;/p&gt;

&lt;p&gt;Marketing teams think about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Recall&lt;/li&gt;
&lt;li&gt;Awareness&lt;/li&gt;
&lt;li&gt;Engagement&lt;/li&gt;
&lt;li&gt;Repetition&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Engineering teams think about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delivery&lt;/li&gt;
&lt;li&gt;Timing&lt;/li&gt;
&lt;li&gt;Reliability&lt;/li&gt;
&lt;li&gt;Scale&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Notifications sit exactly in the middle.&lt;/p&gt;

&lt;p&gt;Marketing decides what should be remembered. Engineering decides how it reaches the user.&lt;/p&gt;

&lt;p&gt;When both work together, notifications stop being noise. They become memory hooks.&lt;/p&gt;

&lt;p&gt;Why this matters in digital products. &lt;br&gt;
In apps, users forget fast. They install today. They disappear tomorrow.&lt;/p&gt;

&lt;p&gt;Notifications exist to gently say: “Hey, remember us.”&lt;/p&gt;

&lt;p&gt;But the goal is not to shout. The goal is to stay familiar.&lt;/p&gt;

&lt;p&gt;Just like that pen on your desk.&lt;/p&gt;

&lt;p&gt;Just like that bag you carry every day.&lt;/p&gt;

&lt;p&gt;The real job of a notification:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Not to interrupt.&lt;/li&gt;
&lt;li&gt;Not to spam.&lt;/li&gt;
&lt;li&gt;Not to beg for attention.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Its real job is simple. To stay in the user’s mind&lt;br&gt;
so when the moment comes, they remember you.&lt;/p&gt;

&lt;p&gt;That’s not just communication. That’s connection.&lt;/p&gt;

&lt;p&gt;And that’s why notifications are not only a tech feature.&lt;/p&gt;

&lt;p&gt;They are &lt;strong&gt;&lt;em&gt;psychology&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
They are &lt;strong&gt;&lt;em&gt;marketing&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
They are &lt;strong&gt;&lt;em&gt;memory&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In next Blog we'll discuss about a Tech architecture how does a application cann plan for a notification service to make your brand pop out in their mind when they remeber something.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>A New Year, an Open Source Tool</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Thu, 01 Jan 2026 05:19:26 +0000</pubDate>
      <link>https://dev.to/surhidamatya/a-new-year-an-open-source-tool-38in</link>
      <guid>https://dev.to/surhidamatya/a-new-year-an-open-source-tool-38in</guid>
      <description>&lt;p&gt;A New Year, an Open Source Tool, and a Small Problem That Kept Bugging Me&lt;/p&gt;

&lt;p&gt;There’s something about the start of a new year that makes you want to clean things up.&lt;/p&gt;

&lt;p&gt;Not just desks and calendars, but ideas that have been sitting in your head for a while.&lt;/p&gt;

&lt;p&gt;For me, one of those ideas was API documentation.&lt;/p&gt;

&lt;p&gt;Over the past few weeks, I’ve been writing about APIs, how systems communicate, and why documentation matters more than we usually admit. All of that wasn’t theory. It came from a very real problem I kept running into.&lt;/p&gt;

&lt;p&gt;We technically had API documentation. But it didn’t feel shareable.&lt;/p&gt;

&lt;p&gt;It worked for engineers. It didn’t work for conversations.&lt;/p&gt;

&lt;p&gt;And that gap kept showing up at the worst moments.&lt;/p&gt;

&lt;p&gt;The small frustration that wouldn’t go away&lt;/p&gt;

&lt;p&gt;Every time someone outside the backend team asked, “Can you share the API docs?”&lt;/p&gt;

&lt;p&gt;I paused.&lt;/p&gt;

&lt;p&gt;Not because the docs didn’t exist. But because I knew what they would see.&lt;/p&gt;

&lt;p&gt;Swagger links. Postman collections. Accurate, but intimidating.&lt;/p&gt;

&lt;p&gt;I didn’t want to explain how to read the documentation before they could even understand the API.&lt;/p&gt;

&lt;p&gt;That pause was the signal.&lt;/p&gt;

&lt;p&gt;I didn’t want to replace tools. I wanted to connect them.&lt;/p&gt;

&lt;p&gt;This wasn’t about building yet another documentation generator.&lt;/p&gt;

&lt;p&gt;Swagger already does a great job. Postman is powerful. OpenAPI exists for a reason.&lt;/p&gt;

&lt;p&gt;The problem wasn’t missing data. The problem was missing context and presentation.&lt;/p&gt;

&lt;p&gt;So I started building something very small for myself.&lt;/p&gt;

&lt;p&gt;A simple web app that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Connects to Swagger / OpenAPI URLs&lt;/li&gt;
&lt;li&gt;Optionally reads Postman collections&lt;/li&gt;
&lt;li&gt;Keeps documentation live and in sync&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Presents APIs in a more human, browsable way&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;No uploads every time something changes.&lt;/li&gt;
&lt;li&gt;No PDFs going stale.&lt;/li&gt;
&lt;li&gt;No guessing which version is correct.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Just one place to point people to.&lt;/p&gt;

&lt;p&gt;Why open source it?&lt;/p&gt;

&lt;p&gt;At some point, it became obvious this wasn’t just my problem.&lt;/p&gt;

&lt;p&gt;If you’re building APIs that are meant to be reused, shared, or trusted, you eventually hit the same wall:&lt;br&gt;
“Technically documented” is not the same as “understandable”.&lt;/p&gt;

&lt;p&gt;So instead of keeping this as an internal utility, I decided to open source it. Just a tool that grew out of a real need.&lt;/p&gt;

&lt;p&gt;The project&lt;/p&gt;

&lt;p&gt;It’s early.&lt;br&gt;
It’s evolving.&lt;br&gt;
And it’s intentionally simple.&lt;/p&gt;

&lt;p&gt;If you’re curious, here’s the repository:&lt;br&gt;
&lt;a href="https://github.com/surhidamatya/api-baucha" rel="noopener noreferrer"&gt;api-baucha&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll find:&lt;/p&gt;

&lt;p&gt;The idea, structure room to improve it together&lt;/p&gt;

&lt;p&gt;Why this feels like the right way to start the year&lt;/p&gt;

&lt;p&gt;Open-sourcing this feels like closing a loop.&lt;/p&gt;

&lt;p&gt;From:&lt;br&gt;
“What is an API?”&lt;br&gt;
To:&lt;br&gt;
“How systems communicate”&lt;br&gt;
To:&lt;br&gt;
“Why documentation breaks”&lt;br&gt;
To:&lt;br&gt;
“Let’s try something different”&lt;/p&gt;

&lt;p&gt;It’s not about perfection. It’s about clarity.&lt;/p&gt;

&lt;p&gt;And if this tool saves even a few people from hesitating before sharing their API docs, it’s already done its job.&lt;/p&gt;

&lt;p&gt;I’ll keep writing as this evolves. And I’ll keep it honest.&lt;/p&gt;

&lt;p&gt;That feels like a good way to begin the year.&lt;/p&gt;

&lt;p&gt;Happy New Year.&lt;/p&gt;

</description>
      <category>documentation</category>
      <category>opensource</category>
      <category>tooling</category>
      <category>api</category>
    </item>
    <item>
      <title>How APIs Actually Travel Between Systems</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Sat, 27 Dec 2025 12:37:52 +0000</pubDate>
      <link>https://dev.to/surhidamatya/how-apis-actually-travel-between-systems-5adj</link>
      <guid>https://dev.to/surhidamatya/how-apis-actually-travel-between-systems-5adj</guid>
      <description>&lt;p&gt;So far, we’ve talked about APIs as a way for systems to communicate.&lt;/p&gt;

&lt;p&gt;But here’s an important clarification.&lt;/p&gt;

&lt;p&gt;An API defines what systems say to each other. Network protocols define how those messages travel.&lt;/p&gt;

&lt;p&gt;Let's discuss about some of the most common ways messages move across the network.&lt;/p&gt;

&lt;p&gt;Think of APIs as the language. Think of protocols as the roads, vehicles, and traffic rules.&lt;/p&gt;

&lt;p&gt;Let’s walk through the important ones in simple terms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP – the basic conversation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTTP is the most common way applications talk over the internet. When you open a website or an app loads data, it usually uses HTTP underneath.&lt;/p&gt;

&lt;p&gt;How it behaves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One side sends a message&lt;/li&gt;
&lt;li&gt;The other side replies&lt;/li&gt;
&lt;li&gt;Conversation ends&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It’s like sending a letter and waiting for a reply. This works well for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Loading pages&lt;/li&gt;
&lt;li&gt;Fetching data&lt;/li&gt;
&lt;li&gt;Simple request–response communication&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;HTTPS – HTTP with a lock&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTTPS is the same as HTTP, but secured. Think of it like sending the same letter, but inside a locked envelope. Only the sender and receiver can read it.&lt;/p&gt;

&lt;p&gt;That’s why HTTPS is used for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login systems&lt;/li&gt;
&lt;li&gt;Payments&lt;/li&gt;
&lt;li&gt;Any sensitive data&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From an API point of view, nothing changes in behavior. Only privacy and safety improve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebSocket – keeping the call open&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WebSocket is different. Instead of sending a message and closing the connection, it keeps the line open.&lt;/p&gt;

&lt;p&gt;It’s like a phone call:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Both sides stay connected&lt;/li&gt;
&lt;li&gt;Both can speak anytime&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is used when:&lt;/p&gt;

&lt;p&gt;Messages need to flow both ways where Updates must be instant&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Live chat&lt;/li&gt;
&lt;li&gt;Real-time notifications&lt;/li&gt;
&lt;li&gt;Live dashboards&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;APIs using WebSockets don’t “ask again and again”.They listen continuously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TCP – slow but reliable delivery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;TCP is about reliability. Imagine sending fragile items through a courier service that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Confirms delivery&lt;/li&gt;
&lt;li&gt;Resends if something is lost&lt;/li&gt;
&lt;li&gt;Keeps things in order&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s TCP. Most APIs rely on TCP underneath because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Messages arrive correctly&lt;/li&gt;
&lt;li&gt;Nothing is lost silently&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It’s slower than some options, but trustworthy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UDP – fast but no guarantees&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UDP is the opposite approach. It sends messages quickly, without checking if they arrived.&lt;/p&gt;

&lt;p&gt;Imagine shouting information across a room: Some people may miss it&lt;br&gt;
But it’s fast&lt;/p&gt;

&lt;p&gt;UDP is used where speed matters more than perfection:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Video calls&lt;/li&gt;
&lt;li&gt;Live streaming&lt;/li&gt;
&lt;li&gt;Online games&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;APIs rarely use UDP directly, but systems built on real-time data often do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP/3 (QUIC) – modern and faster roads&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTTP/3 is a newer version of HTTP that runs on top of UDP.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reduce delays&lt;/li&gt;
&lt;li&gt;Recover faster from network issues&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It’s useful for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Mobile apps&lt;/li&gt;
&lt;li&gt;IoT devices&lt;/li&gt;
&lt;li&gt;Real-time experiences&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From the API point of view, this mostly happens behind the scenes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SMTP and FTP – special-purpose messengers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some protocols exist for very specific jobs.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SMTP is designed for emails.&lt;/li&gt;
&lt;li&gt;FTP is designed for file transfers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;They are not general API communication tools, but they still represent structured system-to-system communication.&lt;/p&gt;

&lt;p&gt;They follow strict rules, just like APIs do.&lt;/p&gt;

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

&lt;p&gt;APIs don’t float magically between systems. They travel using protocols like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;HTTP / HTTPS&lt;/li&gt;
&lt;li&gt;WebSocket&lt;/li&gt;
&lt;li&gt;TCP / UDP&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Documentation tells you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which protocol is used&lt;/li&gt;
&lt;li&gt;What behavior to expect&lt;/li&gt;
&lt;li&gt;Whether communication is instant or delayed&lt;/li&gt;
&lt;li&gt;Whether it’s one-time or continuous&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without this clarity, teams guess. And guessing leads to fragile systems.&lt;/p&gt;

&lt;p&gt;Why this matters for documentation?&lt;/p&gt;

&lt;p&gt;When API documentation is good, it answers questions like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do I request or do I listen?&lt;/li&gt;
&lt;li&gt;Is this real-time or delayed?&lt;/li&gt;
&lt;li&gt;Is this secure?&lt;/li&gt;
&lt;li&gt;Will I get a response immediately?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without documentation, developers press buttons randomly, like using a TV remote without knowing what each button does.&lt;/p&gt;

&lt;p&gt;And that brings us back to the same point again.&lt;/p&gt;

&lt;p&gt;Good documentation doesn’t just explain APIs. It explains how to communicate safely and correctly.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>Why Good API Documentation Feels Invisible (Until It’s Missing)</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Thu, 25 Dec 2025 07:19:35 +0000</pubDate>
      <link>https://dev.to/surhidamatya/why-good-api-documentation-feels-invisible-until-its-missing-28h8</link>
      <guid>https://dev.to/surhidamatya/why-good-api-documentation-feels-invisible-until-its-missing-28h8</guid>
      <description>&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%2F9a24l8dbon4q37428lpx.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%2F9a24l8dbon4q37428lpx.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine buying a standing fan. All the parts are inside the box.&lt;br&gt;
The motor works. The blades are fine.&lt;/p&gt;

&lt;p&gt;But there’s&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;No manual.&lt;/li&gt;
&lt;li&gt;No guide.&lt;/li&gt;
&lt;li&gt;No steps.&lt;/li&gt;
&lt;li&gt;No diagram.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You stare at the parts, try to assemble them, remove them again, tighten something that shouldn’t be tightened, and after a while you start wondering if the fan is broken or if you are or some aabra ka daabra will do the magic.&lt;/p&gt;

&lt;p&gt;Now imagine buying a smart TV without instructions.&lt;/p&gt;

&lt;p&gt;The screen turns on, but:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The remote has too many buttons&lt;/li&gt;
&lt;li&gt;Settings feel hidden&lt;/li&gt;
&lt;li&gt;You don’t know what features exist&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The product technically works, but you never reach its full potential.&lt;/p&gt;

&lt;p&gt;That frustration is exactly what bad API documentation feels like. APIs without documentation feel the same. Have you ever tried using:&lt;/p&gt;

&lt;p&gt;A new API, new library or even a new internal service&lt;/p&gt;

&lt;p&gt;Everything is “there”, but nothing feels clear.&lt;/p&gt;

&lt;p&gt;You try one value. It fails. You try another. It half-works.&lt;br&gt;
Error messages appear, but don’t really help.&lt;/p&gt;

&lt;p&gt;You start Googling.&lt;br&gt;
You read random examples.&lt;br&gt;
You question whether you’re even using it correctly.&lt;/p&gt;

&lt;p&gt;Then suddenly, you find a well-written guide.&lt;/p&gt;

&lt;p&gt;Things click.&lt;br&gt;
You move faster with confidence.&lt;/p&gt;

&lt;p&gt;That’s the power of good documentation.&lt;/p&gt;

&lt;p&gt;Documentation is how systems introduce themselves. An API is a way for systems to talk to each other.&lt;/p&gt;

&lt;p&gt;Documentation is how the API explains itself. It answers basic questions like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What can I do with you?&lt;/li&gt;
&lt;li&gt;How should I talk to you?&lt;/li&gt;
&lt;li&gt;What do you expect from me?&lt;/li&gt;
&lt;li&gt;What will you give me back?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without documentation, systems are forced into guessing. And guessing does not scale.&lt;/p&gt;

&lt;p&gt;Good code does not remove the need for documentation&lt;/p&gt;

&lt;p&gt;There’s a common belief: “Well-written code doesn’t need documentation.”&lt;/p&gt;

&lt;p&gt;That sounds reasonable, but it breaks down in real systems.&lt;/p&gt;

&lt;p&gt;Code explains how something works. Documentation explains how to use it.&lt;/p&gt;

&lt;p&gt;A few realities we all know:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Features rarely live in one file&lt;/li&gt;
&lt;li&gt;Logic is often spread across services&lt;/li&gt;
&lt;li&gt;Dependencies are not always obvious&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Reading code alone doesn’t tell you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What assumptions were made&lt;/li&gt;
&lt;li&gt;What must not be changed&lt;/li&gt;
&lt;li&gt;What other systems depend on this behavior&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Documentation connects those invisible lines. APIs are contracts, not just code&lt;/p&gt;

&lt;p&gt;Every service you build exposes an API.&lt;/p&gt;

&lt;p&gt;That API is a promise: “If you talk to me like this, I will respond like that.”&lt;/p&gt;

&lt;p&gt;You don’t want to explain this promise inside your classes or functions.&lt;br&gt;
That would clutter the code and still not help non-developers.&lt;/p&gt;

&lt;p&gt;This is why API documentation exists outside the code.&lt;/p&gt;

&lt;p&gt;It’s a shared agreement that anyone can read. Not everyone reading your docs writes code and this part is often ignored.&lt;/p&gt;

&lt;p&gt;API documentation is not just for developers. It’s also read by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;QA teams&lt;/li&gt;
&lt;li&gt;Product managers&lt;/li&gt;
&lt;li&gt;Frontend developers&lt;/li&gt;
&lt;li&gt;Partners&lt;/li&gt;
&lt;li&gt;Sometimes investors&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;They don’t want to understand your implementation. They want to understand capabilities and boundaries.&lt;/p&gt;

&lt;p&gt;Documentation makes your system understandable beyond engineering.&lt;/p&gt;

&lt;p&gt;Writing documentation improves your own thinking. Something interesting happens when you write documentation.&lt;/p&gt;

&lt;p&gt;You start asking yourself:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does this actually make sense?&lt;/li&gt;
&lt;li&gt;Why does this work this way?&lt;/li&gt;
&lt;li&gt;Is this more complicated than it should be?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Explaining a system forces clarity. Many design issues are discovered not while coding, but while documenting.&lt;/p&gt;

&lt;p&gt;Documentation is not extra work. It’s a design review you do with yourself.&lt;/p&gt;

&lt;p&gt;So what does good API documentation actually include?&lt;/p&gt;

&lt;p&gt;Good API documentation answers practical questions. Not everything. Just the right things.&lt;/p&gt;

&lt;p&gt;It usually explains:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What the API is meant to do&lt;/li&gt;
&lt;li&gt;How others should interact with it&lt;/li&gt;
&lt;li&gt;What inputs are expected&lt;/li&gt;
&lt;li&gt;What outputs look like&lt;/li&gt;
&lt;li&gt;What errors mean&lt;/li&gt;
&lt;li&gt;What is allowed and what is not&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think of it like a TV remote manual:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Button names&lt;/li&gt;
&lt;li&gt;What each button does&lt;/li&gt;
&lt;li&gt;What happens if you press the wrong one&lt;/li&gt;
&lt;li&gt;Without that, users keep pressing random buttons and blaming the TV.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why this matters more than ever? &lt;br&gt;
Modern systems are built from many moving parts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Different teams.&lt;/li&gt;
&lt;li&gt;Different services.&lt;/li&gt;
&lt;li&gt;Different communication styles.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The only thing holding them together is clear agreement. Documentation is that agreement written down.&lt;/p&gt;

&lt;p&gt;Good APIs can fail because of poor documentation. Average APIs can succeed because their documentation is clear.&lt;/p&gt;

&lt;p&gt;Because at the end of the day: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Systems run on code. Teams run on understanding.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>development</category>
    </item>
    <item>
      <title>How does API work? WHere's the manual?</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Wed, 24 Dec 2025 02:50:14 +0000</pubDate>
      <link>https://dev.to/surhidamatya/how-does-api-work-wheres-the-manual-44he</link>
      <guid>https://dev.to/surhidamatya/how-does-api-work-wheres-the-manual-44he</guid>
      <description>&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%2Fmiql1l0huo1kll8lrtlp.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%2Fmiql1l0huo1kll8lrtlp.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far, we’ve talked about many things.&lt;/p&gt;

&lt;p&gt;One system shares information.&lt;br&gt;
Another system consumes it.&lt;br&gt;
Both agree on how that exchange works.&lt;/p&gt;

&lt;p&gt;That agreement is the foundation of all system communication.&lt;/p&gt;

&lt;p&gt;But here’s the real question.&lt;/p&gt;

&lt;p&gt;If two systems have never met before, how does one system know:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;that the other system exists?&lt;/li&gt;
&lt;li&gt;how to talk to it?&lt;/li&gt;
&lt;li&gt;which channel to use?&lt;/li&gt;
&lt;li&gt;what kind of information is allowed?&lt;/li&gt;
&lt;li&gt;what happens if something goes wrong?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Systems don’t guess. They don’t experiment blindly. They rely on instructions to communicate and that instruction is Documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does one system know how to communicate?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s go back to a simple example.&lt;/p&gt;

&lt;p&gt;The TV remote again&lt;/p&gt;

&lt;p&gt;Imagine buying a new TV, but there is no manual. You pick up the remote and start pressing random buttons. One button increases volume. Another suddenly changes language. Another switches input&lt;/p&gt;

&lt;p&gt;Another turns the TV off completely&lt;/p&gt;

&lt;p&gt;You could eventually figure it out, but only through trial and error.&lt;/p&gt;

&lt;p&gt;That’s exactly what happens when systems try to integrate without documentation.&lt;/p&gt;

&lt;p&gt;They keep guessing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does this value work?&lt;/li&gt;
&lt;li&gt;What happens if I send this?&lt;/li&gt;
&lt;li&gt;Why did it fail?&lt;/li&gt;
&lt;li&gt;What does this response even mean?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It’s slow, frustrating, and risky.&lt;/p&gt;

&lt;p&gt;Documentation is the remote’s manual.&lt;/p&gt;

&lt;p&gt;It clearly says:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;This button does this&lt;/li&gt;
&lt;li&gt;This input is expected&lt;/li&gt;
&lt;li&gt;This behavior is guaranteed&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Channels matter, not just messages&lt;/p&gt;

&lt;p&gt;Earlier, we talked about different ways systems communicate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Asking for data&lt;/li&gt;
&lt;li&gt;Being notified by events&lt;/li&gt;
&lt;li&gt;Streaming updates&lt;/li&gt;
&lt;li&gt;Sending files&lt;/li&gt;
&lt;li&gt;Waiting for callbacks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But how does a system know which channel to use?&lt;/p&gt;

&lt;p&gt;Think of communication in daily life.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You don’t send a wedding invitation via a fire alarm.&lt;/li&gt;
&lt;li&gt;You don’t call someone on the phone to send them a photo album.&lt;/li&gt;
&lt;li&gt;You don’t shout breaking news through a letter.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The channel matters.&lt;/p&gt;

&lt;p&gt;Documentation tells systems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Where to send requests&lt;/li&gt;
&lt;li&gt;Where to listen for events&lt;/li&gt;
&lt;li&gt;When to wait and when to react&lt;/li&gt;
&lt;li&gt;What kind of communication is expected&lt;/li&gt;
&lt;li&gt;Without that clarity, systems talk past each other.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The fishing hook example, but with instructions&lt;/p&gt;

&lt;p&gt;Earlier, we used the fishing hook example for webhooks.&lt;/p&gt;

&lt;p&gt;Now imagine someone gives you a fishing rod but tells you nothing else.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Where do you throw the hook?&lt;/li&gt;
&lt;li&gt;What kind of fish are you catching?&lt;/li&gt;
&lt;li&gt;How do you know when something is caught?&lt;/li&gt;
&lt;li&gt;What do you do after the hook moves?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You could try randomly, but success would depend on luck.&lt;/p&gt;

&lt;p&gt;Documentation is what tells you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Where to place the hook&lt;/li&gt;
&lt;li&gt;What kind of fish to expect&lt;/li&gt;
&lt;li&gt;What movement means “something happened”&lt;/li&gt;
&lt;li&gt;What to do next&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Systems need the same clarity. This is where API documentation comes in&lt;/p&gt;

&lt;p&gt;API documentation exists to answer very practical questions like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Where do I send information?&lt;/li&gt;
&lt;li&gt;What information is allowed?&lt;/li&gt;
&lt;li&gt;What information is required?&lt;/li&gt;
&lt;li&gt;What will I get back?&lt;/li&gt;
&lt;li&gt;What events can I listen to?&lt;/li&gt;
&lt;li&gt;What does success or failure look like?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To help teams answer these questions consistently, developers use tools like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://swagger.io/" rel="noopener noreferrer"&gt;Swagger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And similar documentation platforms&lt;/p&gt;

&lt;p&gt;These tools don’t just list APIs. They describe the rules of communication.&lt;/p&gt;

&lt;p&gt;They act like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A remote control manual&lt;/li&gt;
&lt;li&gt;A translator’s guide&lt;/li&gt;
&lt;li&gt;A communication contract between systems&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;What happens without documentation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Without documentation, integration becomes guesswork.&lt;/p&gt;

&lt;p&gt;Teams are forced into trial-and-error:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sending random values to see what works&lt;/li&gt;
&lt;li&gt;Reading error messages like puzzles&lt;/li&gt;
&lt;li&gt;Learning behavior only after something breaks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This wastes time and creates fragile systems.&lt;/p&gt;

&lt;p&gt;Two systems might appear to work today, but the moment something changes, everything falls apart.&lt;/p&gt;

&lt;p&gt;Documentation prevents this by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Defining standards&lt;/li&gt;
&lt;li&gt;Setting expectations&lt;/li&gt;
&lt;li&gt;Making communication predictable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The quiet truth&lt;/p&gt;

&lt;p&gt;Well-designed APIs can still fail if their documentation is poor. And average APIs can succeed if their documentation is clear.&lt;/p&gt;

&lt;p&gt;Because systems don’t just need a way to talk. They need a shared understanding of how to talk.&lt;/p&gt;

&lt;p&gt;In the next part, let's talk about why many API documentation tools focus more on technical completeness than human understanding, and how that gap shows up the moment non-engineers, partners, or investors look at them.&lt;/p&gt;

&lt;p&gt;That’s where things usually break.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>documentation</category>
    </item>
    <item>
      <title>Platform-Agnosticism in Flutter: A Deep Dive</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Tue, 23 Dec 2025 04:41:11 +0000</pubDate>
      <link>https://dev.to/surhidamatya/platform-agnosticism-in-flutter-a-deep-dive-o57</link>
      <guid>https://dev.to/surhidamatya/platform-agnosticism-in-flutter-a-deep-dive-o57</guid>
      <description>&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%2Fohikykojae7vr44stv61.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%2Fohikykojae7vr44stv61.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In today’s world, users expect a seamless experience across their devices, whether they’re using a smartphone, tablet, desktop, or even a web application. As developers, ensuring this consistency can be challenging due to the variations in operating systems. However, Flutter makes this easier by being platform-agnostic.&lt;/p&gt;

&lt;p&gt;But what does platform-agnosticism mean, and how does Flutter achieve it? This blog explores the concept, compares Flutter with other cross-platform tools, and breaks down the unique architecture that makes Flutter truly platform-independent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Platform-Agnosticism?&lt;/strong&gt;&lt;br&gt;
Platform-agnosticism refers to how an application delivers a consistent user experience regardless of the underlying operating system. A platform-agnostic app works the same way across devices, hiding the complexities of different platforms from the user.&lt;/p&gt;

&lt;p&gt;Users don’t care about the technical hurdles behind app development; they just want a smooth and consistent experience. That’s why being platform-agnostic is crucial.&lt;/p&gt;

&lt;p&gt;Flutter embraces this philosophy by ensuring that apps look, feel, and function the same way across multiple platforms. Unlike other frameworks that rely on platform-specific UI components, Flutter has its own rendering engine that ensures uniformity.&lt;/p&gt;

&lt;p&gt;But before we dive into how Flutter achieves this, let’s explore how native apps and other cross-platform frameworks work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Native and Cross-Platform Apps Work&lt;/strong&gt;&lt;br&gt;
Every operating system—be it Android, iOS, Windows, macOS, or Linux—has its own set of Software Development Kits (SDKs) and Application Programming Interfaces (APIs) for building apps. These native apps interact with the operating system to access UI elements, hardware, and system services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Native Apps Work&lt;/strong&gt;&lt;br&gt;
Traditionally, if you wanted to build an app for both Android and iOS, you would need to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Kotlin/Java and the Android SDK for Android development.&lt;/li&gt;
&lt;li&gt;Use Swift/Objective-C and the iOS SDK for iOS development.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach requires separate codebases, meaning more development time, higher maintenance efforts, and developers with expertise in different programming languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Cross-Platform Apps Work&lt;/strong&gt;&lt;br&gt;
To overcome the challenge of managing multiple codebases, cross-platform frameworks were introduced. They allow developers to write a single codebase that runs on multiple platforms.&lt;/p&gt;

&lt;p&gt;Popular cross-platform tools include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;React Native (uses JavaScript)&lt;/li&gt;
&lt;li&gt;Xamarin (uses C#)&lt;/li&gt;
&lt;li&gt;Flutter (uses Dart)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;However, most cross-platform frameworks rely on bridges to communicate with the native OS. These bridges translate cross-platform code into native components, causing slight delays in performance. Some frameworks even use web views to render UI elements, making them dependent on the underlying platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Flutter is Different&lt;/strong&gt;&lt;br&gt;
Flutter takes a unique approach to cross-platform development by ensuring that the app itself is independent of the host platform.&lt;/p&gt;

&lt;p&gt;Instead of using platform-specific UI components, Flutter renders everything from scratch using its own Flutter engine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s how it works:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you build a Flutter app for a platform (e.g., Android):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The output is an APK (Android Package).&lt;/li&gt;
&lt;li&gt;Inside this APK, there’s a Flutter engine along with the Flutter app.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the user runs the app, the Flutter engine takes control and executes the Flutter app, ensuring the same behavior across all devices.&lt;br&gt;
This self-contained nature of Flutter apps makes them truly platform-agnostic, as they do not rely on platform-specific UI elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Flutter Renders User Interfaces (UIs)&lt;/strong&gt;&lt;br&gt;
Flutter achieves platform-agnostic UI rendering through a multi-layered architecture, which includes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Embedder&lt;/li&gt;
&lt;li&gt;Flutter Engine&lt;/li&gt;
&lt;li&gt;Flutter Framework (Dart code)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;1. Embedder&lt;/strong&gt;&lt;br&gt;
The embedder is the interface between the Flutter engine and the host platform. It allows Flutter apps to run on different operating systems by providing an Application Binary Interface (ABI).&lt;/p&gt;

&lt;p&gt;Each platform has a separate embedder, written in the platform’s native language (e.g., Swift for iOS, Kotlin for Android, C++ for Windows).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Flutter Engine&lt;/strong&gt;&lt;br&gt;
The Flutter engine is responsible for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Running Dart code&lt;/li&gt;
&lt;li&gt;Managing assets&lt;/li&gt;
&lt;li&gt;Handling events&lt;/li&gt;
&lt;li&gt;Rendering UI&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For rendering, Flutter uses Skia or Impeller:&lt;br&gt;
&lt;strong&gt;Skia&lt;/strong&gt;: An open-source graphics library that ensures smooth UIs.&lt;br&gt;
&lt;strong&gt;Impeller&lt;/strong&gt;: A new rendering engine that improves performance and is already the default for iOS.&lt;/p&gt;

&lt;p&gt;Flutter doesn’t rely on native UI components but instead draws UI elements directly onto a blank “canvas” provided by the host platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Flutter Framework&lt;/strong&gt;&lt;br&gt;
At the highest level, the Flutter framework contains:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Widgets (UI components)&lt;/li&gt;
&lt;li&gt;Dart code (business logic)&lt;/li&gt;
&lt;li&gt;Animations and interactions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because Flutter controls its own rendering, it ensures that apps look and behave the same way, no matter where they run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Channels&lt;/strong&gt;: How Flutter Interacts with Native Services&lt;br&gt;
Although Flutter apps are independent of the host OS, they sometimes need to access platform-specific features (e.g., camera, GPS, Bluetooth).&lt;/p&gt;

&lt;p&gt;This is achieved through Platform Channels, which act as bridges between Flutter and the native platform.&lt;/p&gt;

&lt;p&gt;There are two main types of platform channels:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Method Channels&lt;/strong&gt;&lt;br&gt;
Method channels allow bidirectional communication between Flutter (Dart) and the native platform.&lt;/p&gt;

&lt;p&gt;For example, if your Flutter app needs to access the device’s GPS, it can send a request through a method channel, and the native side will return the GPS coordinates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Event Channels&lt;/strong&gt;&lt;br&gt;
Event channels are used for continuous data streams from the native platform to Flutter.&lt;/p&gt;

&lt;p&gt;They are useful for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Listening to sensor data (e.g., accelerometer, gyroscope)&lt;/li&gt;
&lt;li&gt;Receiving push notifications&lt;/li&gt;
&lt;li&gt;Monitoring real-time system events&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By using platform channels, Flutter apps can maintain a unified codebase while still leveraging platform-specific functionalities when needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Packages and Plugins in Flutter&lt;/strong&gt;&lt;br&gt;
Flutter has an extensive package ecosystem on pub.dev, with over 25,000+ packages available.&lt;/p&gt;

&lt;p&gt;Packages extend Flutter's capabilities, while plugins provide access to platform-specific features through platform channels.&lt;/p&gt;

&lt;p&gt;Examples of commonly used plugins:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;camera → Accesses the device camera&lt;/li&gt;
&lt;li&gt;geolocator → Fetches GPS location&lt;/li&gt;
&lt;li&gt;permission_handler → Manages app permissions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If an existing plugin doesn’t cover a required feature, you can create your own using method and event channels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary: Why Flutter’s Platform-Agnosticism Matters&lt;/strong&gt;&lt;br&gt;
Flutter’s ability to run the same app across different platforms is what makes it a game-changer.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Consistent UI across all devices → Flutter doesn’t rely on platform-specific UI components but renders everything using its own engine.&lt;/li&gt;
&lt;li&gt;No dependency on native UI frameworks → Unlike React Native or Xamarin, Flutter doesn’t need bridges to translate UI components.&lt;/li&gt;
&lt;li&gt;Optimized performance → Flutter uses Skia/Impeller for smooth rendering without relying on web views.&lt;/li&gt;
&lt;li&gt;Seamless access to native features → Platform channels allow Flutter apps to interact with device-specific functionalities.&lt;/li&gt;
&lt;li&gt;Future-proof architecture → If a new OS emerges, Flutter apps can easily adapt by adding a new embedder.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Flutter’s platform-agnostic nature allows developers to build high-performance, cross-platform apps while ensuring a consistent user experience.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>mobile</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Just other ways of communication</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Tue, 23 Dec 2025 04:33:26 +0000</pubDate>
      <link>https://dev.to/surhidamatya/just-other-ways-of-communication-4jc9</link>
      <guid>https://dev.to/surhidamatya/just-other-ways-of-communication-4jc9</guid>
      <description>&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%2F1l9snkw8tj6ipajhzgqi.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%2F1l9snkw8tj6ipajhzgqi.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far, we’ve talked about &lt;a href="https://dev.to/surhidamatya/what-is-an-api-a-simple-way-to-understand-it-3li4"&gt;What is an API&lt;/a&gt;, &lt;a href="https://dev.to/surhidamatya/api-agreement-to-communicate-4gh8"&gt;types of API&lt;/a&gt;. &lt;br&gt;
These cover most everyday use cases, but they’re not the only ways systems talk to each other.&lt;/p&gt;

&lt;p&gt;Here are a few more you’ll often hear about and you can explore on your free time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File-based communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes, systems don’t talk live at all. Instead, one system creates a file and another system reads it later.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Examples&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;A system exports a CSV file at midnight. Another system picks it up and processes it in the morning. Reports are shared as files between systems.&lt;/p&gt;

&lt;p&gt;This approach is common when:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Real-time communication is not required&lt;/li&gt;
&lt;li&gt;Different organizations own systems.&lt;/li&gt;
&lt;li&gt;Legacy systems are involved&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It’s simple, but slow. Think of it as leaving a letter instead of having a conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Webhooks (systems calling you back)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A webhook is like saying:&lt;br&gt;
&lt;em&gt;“Don’t ask me again and again. I’ll call you when something happens.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's see an example of fishing hook. You don’t keep checking the hook every second to see if a fish is there. You wait.&lt;/p&gt;

&lt;p&gt;When a fish bites the hook, the hook moves. That movement tells you something happened.&lt;/p&gt;

&lt;p&gt;In the same way, with a webhook:&lt;/p&gt;

&lt;p&gt;One system waits quietly When something important happens, a signal is sent. The other system reacts immediately.&lt;/p&gt;

&lt;p&gt;Nothing is sent unless there is something to report.&lt;/p&gt;

&lt;p&gt;So instead of asking again and again, the system is notified only when there’s actually an event, just like a fishing hook only moves when a fish is caught.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Payment completed&lt;/li&gt;
&lt;li&gt;User signed up&lt;/li&gt;
&lt;li&gt;Order shipped&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Webhooks are widely used in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Payments&lt;/li&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;li&gt;Integrations between products&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;They reduce unnecessary communication and feel more real-time. Instead of one system constantly checking for updates, the other system sends a message automatically when an event occurs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Messaging queues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In some systems, messages are placed into a queue and processed one by one. This is useful when:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Systems need to handle high traffic&lt;/li&gt;
&lt;li&gt;Tasks should not block user actions&lt;/li&gt;
&lt;li&gt;Reliability via async communication matters&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sending emails&lt;/li&gt;
&lt;li&gt;Processing background jobs&lt;/li&gt;
&lt;li&gt;Updating analytics&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Queues help systems stay stable even during traffic spikes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Streaming communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Streaming is used when data flows continuously instead of being requested.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Live chat (eg:  whatsapp chat)&lt;/li&gt;
&lt;li&gt;Live comments (eg: youtube comments during live streaming of a game or event)&lt;/li&gt;
&lt;li&gt;Stock price updates&lt;/li&gt;
&lt;li&gt;Activity feeds ( eg: watch your fb feed it updates automatically for new data)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Instead of asking for updates, systems stay connected and receive data as it happens.&lt;/p&gt;

&lt;p&gt;This approach is common in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Social media&lt;/li&gt;
&lt;li&gt;Financial platforms&lt;/li&gt;
&lt;li&gt;Real-time dashboards&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Direct database access (rare and risky)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes, one system directly reads another system’s database.&lt;/p&gt;

&lt;p&gt;This is generally avoided because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It tightly couples systems&lt;/li&gt;
&lt;li&gt;A small change can break everything&lt;/li&gt;
&lt;li&gt;Security risks are high&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But in tightly controlled internal systems, it still exists.&lt;/p&gt;

&lt;p&gt;Think of this as walking into someone’s house instead of knocking on the door (Would you allow this :) ).&lt;/p&gt;

&lt;p&gt;One idea connects all of them. Whether systems communicate through:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;APIs&lt;/li&gt;
&lt;li&gt;Events&lt;/li&gt;
&lt;li&gt;Files&lt;/li&gt;
&lt;li&gt;Queues&lt;/li&gt;
&lt;li&gt;Streams&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal is always the same:&lt;/p&gt;

&lt;p&gt;One system shares information. Another system consumes it. Both agree on how that exchange works.&lt;/p&gt;

&lt;p&gt;The better this agreement is defined and documented, the easier systems is to build, integrate, and scale systems.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>api</category>
    </item>
    <item>
      <title>API - Agreement to communicate</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Mon, 22 Dec 2025 04:19:26 +0000</pubDate>
      <link>https://dev.to/surhidamatya/api-agreement-to-communicate-4gh8</link>
      <guid>https://dev.to/surhidamatya/api-agreement-to-communicate-4gh8</guid>
      <description>&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%2Ftk5tf9xrndue38gntipc.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%2Ftk5tf9xrndue38gntipc.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://dev.to/surhidamatya/what-is-an-api-a-simple-way-to-understand-it-3li4"&gt;previous post&lt;/a&gt;, we understood what an API is using simple examples like translators, keyboards, and TV remotes.&lt;/p&gt;

&lt;p&gt;Being a human being we always look out for a connection or a way to connect with another being. From 2020 human being have been heavily relying on Social Media Apps to communicate ( example: posting foods on instagram and making it foodagram, posting workout videos or any other videos to ocnnect globally.&lt;/p&gt;

&lt;p&gt;Let's explore how these app communicates via Server to enterntain us, to enlighten us or to train us.&lt;/p&gt;

&lt;p&gt;When you open Instagram, Facebook, X, or LinkedIn, a lot is happening quietly in the background.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Posts are loading&lt;/li&gt;
&lt;li&gt;Likes are being counted&lt;/li&gt;
&lt;li&gt;Comments are appearing&lt;/li&gt;
&lt;li&gt;Notifications are updating&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our beloved device (phone, tablet, computer etc) is not doing all of this by itself.&lt;/p&gt;

&lt;p&gt;Different systems are constantly talking to each other via API - the contract agreed upon to communicate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But how exactly do they talk?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are multiple ways communication through APIs. Let’s explore most common ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. REST APIs (the most common one)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;REST is the most widely used way for applications to communicate today.&lt;/p&gt;

&lt;p&gt;Think of REST like ordering food from a menu.&lt;/p&gt;

&lt;p&gt;You ask for something specific.&lt;br&gt;
You get exactly that.&lt;br&gt;
Clear request, clear response.&lt;/p&gt;

&lt;p&gt;In social media apps, REST-style APIs are often used for things like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Loading a list of posts&lt;/li&gt;
&lt;li&gt;Fetching user profiles&lt;/li&gt;
&lt;li&gt;Showing comments under a post&lt;/li&gt;
&lt;li&gt;Getting notification counts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Why REST is popular&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Easy to read for humans&lt;/li&gt;
&lt;li&gt;Easy to understand for developers&lt;/li&gt;
&lt;li&gt;Works well over the internet&lt;/li&gt;
&lt;li&gt;Simple structure&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because of this, REST APIs are often the first choice when:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Apps need to fetch data&lt;/li&gt;
&lt;li&gt;Mobile and web apps talk to servers&lt;/li&gt;
&lt;li&gt;Readability and simplicity matter&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;2. XML-based APIs (older but still around)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before modern APIs became popular, many systems talked using XML.&lt;/p&gt;

&lt;p&gt;XML is more verbose and structured. It looks heavier, but it is very strict and well-defined.&lt;/p&gt;

&lt;p&gt;You’ll still find XML-based APIs in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Older enterprise systems&lt;/li&gt;
&lt;li&gt;Banking and financial integrations&lt;/li&gt;
&lt;li&gt;Government systems&lt;/li&gt;
&lt;li&gt;Telecom platforms&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Why XML is still used&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Very strict structure&lt;/li&gt;
&lt;li&gt;Strong validation rules&lt;/li&gt;
&lt;li&gt;Works well for complex, formal data contracts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;&lt;code&gt;Readability&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;XML is harder for humans to read compared to REST-style responses.&lt;br&gt;
But machines love its strictness.&lt;/p&gt;

&lt;p&gt;That’s why XML APIs are often used where:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Precision matters more than simplicity&lt;/li&gt;
&lt;li&gt;Systems are large and slow to change&lt;/li&gt;
&lt;li&gt;Stability is more important than developer comfort&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;3. GraphQL (asking exactly what you need)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GraphQL is a newer way of communicating through APIs. Instead of the server deciding what data you get, the client asks exactly what it wants.&lt;/p&gt;

&lt;p&gt;Imagine going to a restaurant and saying:&lt;br&gt;
“I want rice, one piece of chicken, no curry, and extra salad.”&lt;/p&gt;

&lt;p&gt;That’s GraphQL.&lt;/p&gt;

&lt;p&gt;In social media apps, GraphQL is useful when:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Screens need different shapes of data&lt;/li&gt;
&lt;li&gt;Mobile apps want to reduce data usage&lt;/li&gt;
&lt;li&gt;Multiple data sources are involved&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Why teams use GraphQL&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Avoids over-fetching data&lt;/li&gt;
&lt;li&gt;Flexible for frontend teams&lt;/li&gt;
&lt;li&gt;Reduces the number of API calls&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;&lt;code&gt;Trade-off&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;GraphQL is powerful, but more complex to design and maintain.&lt;br&gt;
It’s often used by teams that already have mature systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Event-based communication (not asking, just informing)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So far, all examples were about asking for data.&lt;/p&gt;

&lt;p&gt;But sometimes systems don’t ask. They just inform.&lt;br&gt;
 This is called event-based communication.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You like a post&lt;/li&gt;
&lt;li&gt;The system emits an event: “Post liked”&lt;/li&gt;
&lt;li&gt;Notifications update&lt;/li&gt;
&lt;li&gt;Analytics systems record it&lt;/li&gt;
&lt;li&gt;Recommendation engines react&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All without you waiting. Where this is used&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;li&gt;Activity feeds&lt;/li&gt;
&lt;li&gt;Analytics&lt;/li&gt;
&lt;li&gt;Real-time updates&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Event-based APIs are common in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Social media&lt;/li&gt;
&lt;li&gt;E-commerce&lt;/li&gt;
&lt;li&gt;Financial systems&lt;/li&gt;
&lt;li&gt;Real-time platforms&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;They help systems scale without constantly calling each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Social media apps don’t use just one type of API. They usually combine multiple approaches which differ in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Readability&lt;/li&gt;
&lt;li&gt;Structure&lt;/li&gt;
&lt;li&gt;Flexibility&lt;/li&gt;
&lt;li&gt;Use cases&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But the core idea remains the same.&lt;/p&gt;

&lt;p&gt;One system talks.&lt;br&gt;
Another system listens.&lt;br&gt;
Both agree on how the conversation works.&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>What Is an API? A Simple Way to Understand It</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Sun, 21 Dec 2025 11:56:17 +0000</pubDate>
      <link>https://dev.to/surhidamatya/what-is-an-api-a-simple-way-to-understand-it-3li4</link>
      <guid>https://dev.to/surhidamatya/what-is-an-api-a-simple-way-to-understand-it-3li4</guid>
      <description>&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%2Ffoz28w3ypgcgx2wnxm9d.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%2Ffoz28w3ypgcgx2wnxm9d.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API&lt;/strong&gt; stands for Application Programming Interface. An API is not a screen, nor a website.&lt;br&gt;
It is not something humans usually click and has been using regularly behind scene even more after introduction to social media&lt;/p&gt;

&lt;p&gt;At its simplest, an API is a way for one system to communicate with another.&lt;/p&gt;

&lt;p&gt;A middle layer that helps two different things understand each other without needing to know how the other one works internally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1&lt;/strong&gt;: A language translator&lt;br&gt;
Imagine you speak Nepali and your friend speaks Japanese.&lt;/p&gt;

&lt;p&gt;You want to say, “How are you?”&lt;/p&gt;

&lt;p&gt;You don’t suddenly learn Japanese.&lt;br&gt;
Your friend doesn’t learn Nepali.&lt;/p&gt;

&lt;p&gt;Instead, you can use a translator (personal or google :P ).&lt;/p&gt;

&lt;p&gt;You speak in Nepali.&lt;br&gt;
The translator listens.&lt;br&gt;
The translator speaks Japanese to your friend.&lt;/p&gt;

&lt;p&gt;You don’t care how the translator works inside.&lt;br&gt;
You only care that:&lt;/p&gt;

&lt;p&gt;You say something&lt;br&gt;
The other person understands it&lt;/p&gt;

&lt;p&gt;That translator is acting like an API.&lt;/p&gt;

&lt;p&gt;You provide input in a format you understand.&lt;br&gt;
The translator converts it and passes it forward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2&lt;/strong&gt;: TV remote and television&lt;/p&gt;

&lt;p&gt;A TV remote is a perfect real-world example of an API.&lt;/p&gt;

&lt;p&gt;You press a button.&lt;br&gt;
The TV reacts.&lt;/p&gt;

&lt;p&gt;You don’t know:&lt;/p&gt;

&lt;p&gt;How the signal travels&lt;/p&gt;

&lt;p&gt;How the TV processes it&lt;/p&gt;

&lt;p&gt;How the volume actually increases&lt;/p&gt;

&lt;p&gt;You only know the agreement:&lt;/p&gt;

&lt;p&gt;This button means volume up&lt;/p&gt;

&lt;p&gt;This button means power off&lt;/p&gt;

&lt;p&gt;As long as both sides respect that agreement, things work smoothly.&lt;/p&gt;

&lt;p&gt;That agreement is the key idea behind APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3&lt;/strong&gt;: The hot burning cake (Social media apps)&lt;/p&gt;

&lt;p&gt;Now let’s bring this idea into the digital world. When you open a social media app:&lt;/p&gt;

&lt;p&gt;You see posts&lt;/p&gt;

&lt;p&gt;You see likes&lt;/p&gt;

&lt;p&gt;You see comments&lt;/p&gt;

&lt;p&gt;Your phone is not storing all of this information locally.&lt;/p&gt;

&lt;p&gt;Behind the scenes, your app is talking to another system that holds the data. It asks for posts, sends likes, and fetches comments.&lt;/p&gt;

&lt;p&gt;This conversation happens through &lt;strong&gt;APIs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The app does not directly touch the database. The database does not care about your screen. They communicate through a defined interface.&lt;/p&gt;

&lt;p&gt;That interface is the API.&lt;/p&gt;

&lt;p&gt;The important idea&lt;/p&gt;

&lt;p&gt;An API is not about technology first. It’s about communication and boundaries.&lt;/p&gt;

&lt;p&gt;One system says:&lt;br&gt;
“This is how you can talk to me.”&lt;/p&gt;

&lt;p&gt;The other system says:&lt;br&gt;
“Fine, I’ll talk to you in that way.”&lt;/p&gt;

&lt;p&gt;When APIs are clear and well-designed, systems can grow, change, and scale without breaking each other.&lt;/p&gt;

&lt;p&gt;When APIs are confusing or hard to understand, everything slows down.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://dev.to/surhidamatya/api-agreement-to-communicate-4gh8"&gt;next part&lt;/a&gt;, let's talk about types of APIs and when it's used and how the social media talks using it. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>api</category>
    </item>
    <item>
      <title>Can we ByPass Apple &amp; Google Fees for Subscriptions (Legally!)</title>
      <dc:creator>Surhid Amatya</dc:creator>
      <pubDate>Tue, 18 Mar 2025 05:33:07 +0000</pubDate>
      <link>https://dev.to/surhidamatya/can-we-bypass-apple-google-fees-for-subscriptions-legally-1pj0</link>
      <guid>https://dev.to/surhidamatya/can-we-bypass-apple-google-fees-for-subscriptions-legally-1pj0</guid>
      <description>&lt;p&gt;Apple and Google take a 30% commission on in-app purchases, which can significantly impact businesses that rely on subscriptions. Major apps like Spotify, Netflix, Kindle, etc. have already found legal ways to bypass these fees while staying compliant with store policies.&lt;/p&gt;

&lt;p&gt;Let's deep dive into how to get a user's subscription legally and maximize revenue, this guide will show you how to structure your subscription flow the right way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Key Strategy: Move Payments Outside the App&lt;/strong&gt;&lt;br&gt;
The safest way to bypass in-app purchase fees is to redirect users to your website for payments while ensuring you don’t explicitly mention external payments within the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s Allowed?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can let users sign up for free in the app.&lt;/li&gt;
&lt;li&gt;You can send an email directing users to a payment page.&lt;/li&gt;
&lt;li&gt;You can show subscription benefits but without a "Buy" button.&lt;/li&gt;
&lt;li&gt;You can include a “Manage Subscription” button that opens a browser.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;What’s Not Allowed?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You cannot say “Subscribe on our website for lower fees” in the app.&lt;/li&gt;
&lt;li&gt;You cannot add an external payment link directly inside the app.&lt;/li&gt;
&lt;li&gt;You cannot use WebView to open a payment page (Apple blocks this).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Subscription Flow&lt;/strong&gt;&lt;br&gt;
Here's how you can set up your subscription system to stay compliant and avoid in-app purchase fees:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User registers an account in-app (Email &amp;amp; Full Name).&lt;/li&gt;
&lt;li&gt;User completes KYC (if needed).&lt;/li&gt;
&lt;li&gt;User accesses basic/free features.&lt;/li&gt;
&lt;li&gt;Subscription benefits are shown (e.g., "Upgrade to Premium for these and that features!") but without a direct purchase button.&lt;/li&gt;
&lt;li&gt;A "Manage Subscription" button redirects to an external browser, where users can pay.&lt;/li&gt;
&lt;li&gt;After payment, users log back into the app and get premium access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example UI (Safe for Apple &amp;amp; Google)&lt;/strong&gt;&lt;br&gt;
Here’s how your UI should look:&lt;/p&gt;

&lt;p&gt;Example of a Payment Update Prompt (Without Mentioning Subscription)&lt;br&gt;
Instead of mentioning subscriptions directly, apps use generic messages for payment issues:&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%2Fi65j1j5g6ef5d6m5bikr.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%2Fi65j1j5g6ef5d6m5bikr.png" alt="Image description" width="438" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"Please update your payment information" – Notice that this message does not reference subscriptions but instead directs users to an external website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example of a Manage Subscription Page (Redirecting Users Outside the App)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another example is a "&lt;strong&gt;&lt;em&gt;Manage Subscription&lt;/em&gt;&lt;/strong&gt;" button that directs users to the website:&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%2Frueiwaqfesa1adnlfbwu.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%2Frueiwaqfesa1adnlfbwu.png" alt="Image description" width="800" height="1416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This UI follows the rules: It does not contain an in-app payment button but provides an option to manage the subscription externally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Moving the Subscription Payment?&lt;/strong&gt;&lt;br&gt;
To stay compliant:&lt;/p&gt;

&lt;p&gt;Add a "Manage Subscription" button inside your app.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When tapped, open an external browser (not WebView!).&lt;/li&gt;
&lt;li&gt;Process the payment on your website.&lt;/li&gt;
&lt;li&gt;After payment, allow users to log in and access premium features.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By implementing these strategies, you can retain your revenue while staying fully compliant with Apple &amp;amp; Google policies.&lt;/p&gt;

&lt;p&gt;If you're building a subscription-based app, DO NOT attempt to bypass fees by adding external links inside the app. Instead, use a "Manage Subscription" button that opens a browser and handles payments externally.&lt;/p&gt;

&lt;p&gt;By following this approach, you can avoid app store rejections, maximize revenue, and provide a smooth experience for your users.&lt;/p&gt;

&lt;p&gt;Happy Coding! Safe Coding Always.&lt;/p&gt;

&lt;p&gt;Note: May be this will work for somebody and may not work with somebody. May be in future Apple and Google will have strict action on this as well.&lt;/p&gt;

&lt;p&gt;Reference:&lt;br&gt;
&lt;a href="https://dev.to/surhidamatya/understanding-app-store-fees-2l9d"&gt;https://dev.to/surhidamatya/understanding-app-store-fees-2l9d&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>mobile</category>
      <category>beginners</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
