<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by priyam das on Medium]]></title>
        <description><![CDATA[Stories by priyam das on Medium]]></description>
        <link>https://medium.com/@domidas01?source=rss-4005a5a8f151------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WeI4BqCDNMp8dCnNCUFblQ.png</url>
            <title>Stories by priyam das on Medium</title>
            <link>https://medium.com/@domidas01?source=rss-4005a5a8f151------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:44:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@domidas01/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[API Types and Protocols]]></title>
            <link>https://medium.com/@domidas01/api-types-and-protocols-74226f42ae1e?source=rss-4005a5a8f151------2</link>
            <guid isPermaLink="false">https://medium.com/p/74226f42ae1e</guid>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[priyam das]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 00:15:06 GMT</pubDate>
            <atom:updated>2023-08-31T00:15:06.490Z</atom:updated>
            <content:encoded><![CDATA[<p>In the modern world of software development, Application Programming Interfaces (APIs) play a crucial role in enabling communication between different software components, services, and applications. APIs allow developers to interact with external systems, retrieve or manipulate data, and streamline complex processes. APIs come in various types, each with its own protocols and use cases. In this blog, we will delve into different types of APIs and the protocols that govern their interactions.</p><p>Web APIs (HTTP/HTTPS):</p><ul><li>REST APIs: Representational State Transfer APIs follow a set of architectural principles and constraints, emphasizing statelessness and resource-based interactions. They use HTTP methods like GET, POST, PUT, and DELETE to perform actions on resources. JSON or XML formats are commonly used for data exchange.</li><li>SOAP APIs: Simple Object Access Protocol APIs use XML for message formatting and can operate over various transport protocols, including HTTP, SMTP, and more. SOAP APIs offer features like security, reliability, and transactional support.</li></ul><p>GraphQL APIs:</p><ul><li>GraphQL APIs provide a more flexible and efficient way to interact with data compared to traditional REST APIs. Clients can request specific data fields, reducing over-fetching and under-fetching. There’s a single endpoint for querying and manipulating data, and responses are in JSON format.</li></ul><p>WebSocket APIs:</p><ul><li>WebSocket APIs enable bidirectional, real-time communication between clients and servers. They are suitable for applications requiring constant updates, such as chat applications, live streaming, and online gaming.</li></ul><p>Library/API Wrappers:</p><ul><li>These APIs encapsulate complex functionality or external services into easy-to-use libraries. Developers can use pre-built functions and classes to perform tasks without needing to understand the underlying complexity.</li></ul><p>Operating System APIs:</p><ul><li>Operating system APIs provide functions and services to interact with the underlying operating system. They allow applications to access hardware, file systems, memory management, and other system resources.</li></ul><p>Database APIs:</p><ul><li>Database APIs facilitate communication between applications and databases. They provide methods for establishing connections, querying data, and managing transactions. Examples include JDBC for Java and SQLAlchemy for Python.</li></ul><p>Third-party APIs:</p><ul><li>These APIs are developed by external providers to allow developers to integrate third-party services or data into their applications. Examples include social media APIs (Facebook Graph API, Twitter API), payment gateways (PayPal, Stripe), and mapping services (Google Maps API).</li></ul><p>Open APIs:</p><ul><li>Open APIs, also known as external or public APIs, are made available to developers and third-party vendors with minimal restrictions. They are designed to be accessible to a wider audience and can drive innovation through their use in various applications.</li></ul><p>Private APIs:</p><ul><li>Private APIs, are designed for internal use within an organization. They are used to facilitate communication between different teams, services, or components of a larger application or system.</li></ul><p>Partner APIs:</p><ul><li>Partner APIs are a subset of external APIs that are specifically designed for strategic partners. They enable controlled access to certain functionalities or data, often with more advanced features than public APIs.</li></ul><p>APIs come in a variety of types, each tailored to specific needs and use cases. Understanding the different types of APIs and their associated protocols is crucial for developers to choose the most appropriate approach for their projects. Whether you’re building web applications, mobile apps, or complex backend systems, selecting the right API type and protocol can significantly impact the efficiency, scalability, and functionality of your software.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74226f42ae1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Self vs This]]></title>
            <link>https://medium.com/@domidas01/self-vs-this-1ac4bfdfe0df?source=rss-4005a5a8f151------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ac4bfdfe0df</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[priyam das]]></dc:creator>
            <pubDate>Wed, 09 Aug 2023 19:12:28 GMT</pubDate>
            <atom:updated>2023-08-09T19:12:28.517Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of object-oriented programming, two essential concepts, “self” in Python and “this” in JavaScript, wield great power in shaping how we interact with objects and their methods. Although they share similarities in referencing the current object, they operate in distinct ways due to the unique nature of their respective languages. In this article, we’ll embark on a journey to unravel the differences between “self” in Python and “this” in JavaScript, shedding light on their applications, behaviors, and implications in the programming landscape.</p><p>In Python, “self” refers to the instance of a class that is being manipulated. It acts as a conventional parameter used within instance methods to indicate that the method is bound to the instance it is called on. It is not a reserved keyword; rather, it’s a commonly used name for the first parameter of instance methods. It serves as a gateway to accessing the attributes and methods of the instance. It allows methods to interact with instance-specific data, ensuring encapsulation and modular code structure. It plays a pivotal role in class inheritance. It is used to reference both the instance’s attributes and overridden methods of subclasses. When using “super,” “self” ensures proper method delegation to parent classes.</p><p>In JavaScript, “this” refers to the current execution context. It represents the object on which the current function or method is invoked. The value of “this” depends on how the function is called and is determined dynamically at runtime. “This” is used within object methods to access properties and methods of the current object. It fosters interaction between the method and the object it’s a part of, allowing dynamic behavior based on the object’s state. While “this” is not directly involved in class-based inheritance as in Python, it plays a significant role in JavaScript’s prototypal inheritance. It’s used to access properties and methods inherited from the prototype object.</p><p>Here are some of the key differences between “self ” and “this”:</p><ol><li>“self” is static within a method in Python, consistently referring to the instance it’s called on whereas “this” in JavaScript is dynamic. Its value shifts based on the context of the function call.</li><li>“self” works for both instance and class-based inheritance in Python, ensuring proper access to attributes and methods whereas “this” is more closely tied to prototype-based inheritance in JavaScript.</li><li>“self” is a parameter passed to instance methods in Python whereas “this” is a reserved keyword in JavaScript and doesn’t need to be explicitly declared in function parameters.</li></ol><p>While “self” in Python and “this” in JavaScript share a common objective of referencing the current object, their distinct behaviors arise from the design philosophies and execution models of their respective languages. “self” empowers structured access to instance attributes and methods within a class, promoting encapsulation. Meanwhile, “this” thrives in its dynamic nature, providing a means to interact with the current execution context and prototype-based inheritance in JavaScript. By delving into the nuances of these concepts, developers can harness their power to create more efficient and expressive code tailored to the strengths of Python and JavaScript.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ac4bfdfe0df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How does React react to code we write?]]></title>
            <link>https://medium.com/@domidas01/how-does-react-react-to-code-we-write-b685e39df0d5?source=rss-4005a5a8f151------2</link>
            <guid isPermaLink="false">https://medium.com/p/b685e39df0d5</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[behind-the-scenes]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[priyam das]]></dc:creator>
            <pubDate>Mon, 03 Jul 2023 16:51:55 GMT</pubDate>
            <atom:updated>2023-07-03T16:51:55.732Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uYP1ZdJMURXJQRGLlUyA8w.png" /></figure><p>React is one of the most popular JavaScript libraries to build user interfaces. Developers can write resuable UI components and update the DOM based on changes in their states. However, except for UI components, there are no other differences that make it significantly different than the regular way we have been doing it using vanilla JavaScript, or so we thought!</p><p>React only knows how to work with components. It does not care whether those components contain HTML elements or some fictional elements. It has no inkling of the web browser. Then how do we see all those changes in our web browser if it doesn’t know what that is? The answer is another library called ReactDOM. It is React’s interface to the web. React manages components, props, context, states, differences between previous states and current states and then it hands down all the information regarding what changed and what should be visible on the screen to the interface that it is working with, ReactDOM. It is then ReactDOM’s job to work with the real DOM to update the browser. React uses a brilliant concept called virtual DOM to achieve this. It determines how the component tree currently looks and what it should look like after a state update and then hands that information to ReactDOM. ReactDOM now knows about the differences and how it should manipulate the real DOM to match the virtual DOM, the virtual snapshot React derived from the component trees. Whenever state props or a context of a component changes, the component function is re-executed and the component is re-evaluated. However just because a component is re-evaluated, it does not mean that the DOM is re-rendered. Real DOM is not changed all the time. It’s changed rarely and only when needed. That is important for performance because making a virtual comparison between the current state and the previous state is fairly simple and is done in memory whereas reaching out to the DOM everytime to change even the slightest thing proves to be a very performance intensive task. React is able to do this by a concept called virtual DOM diffing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b685e39df0d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are Polyfills and Transpilers in JavaScript?]]></title>
            <link>https://medium.com/@domidas01/what-are-polyfills-and-transpilers-in-javascript-dde4be10821f?source=rss-4005a5a8f151------2</link>
            <guid isPermaLink="false">https://medium.com/p/dde4be10821f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[polyfill]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[modern-javascript]]></category>
            <category><![CDATA[transpilers]]></category>
            <dc:creator><![CDATA[priyam das]]></dc:creator>
            <pubDate>Mon, 26 Jun 2023 11:25:11 GMT</pubDate>
            <atom:updated>2023-06-26T11:25:11.703Z</atom:updated>
            <content:encoded><![CDATA[<p>In the ever-evolving landscape of JavaScript, developers constantly strive to create web applications that run smoothly across various browsers and platforms. However, differences in browser capabilities and JavaScript language versions can pose challenges. To address these challanges, two essential tools came to the rescue: polyfills and transpilers.</p><p>Transpilers, also known as source-to-source compilers, are tools that can turn code written in one version of JavaScript to another. They allow developers to write code using the latest and the greatest JavaScript syntaxes and features, while ensuring compatibility with older browsers or specific environments. The most common use case involves converting code written in ECMAScript 6 (ES6) syntax to ECMAScript 5 (ES5) syntax, which is more widely supported.</p><p>One popular transpiler is Babel, which enables developers to write modern JavaScript code and then compiles it into an older version of JavaScript. This process ensures that the code remains compatible with older browsers and environments. Transpilers play a crucial role in the development workflow by allowing developers to take advantage of newer language features without sacrificing backward compatibility.</p><p>A perfect example where a transpiler will come in handy is when a developer uses a “nullish coalescing operator” in his code and a visitor uses an old browser. The code below shows how a transpiler can be used.</p><pre>// before running the transpiler<br>height = height ?? 100;<br><br>// after running the transpiler<br>height = (height !== undefined &amp;&amp; height !== null) ? height : 100;</pre><p>Polyfills, on the other hand, are tools that provide modern JavaScript features to older browsers that lack native support for them. They essentially fill the “poly” or gap between the available browser features and the desired functionality. Polyfills are particularly useful when working with legacy codebases or when targeting browsers that do not support the latest JavaScript APIs.</p><p>When a browser encounters code that uses a JavaScript feature it doesn’t support, a polyfill is loaded as an additional script or module. The polyfill recreates the missing functionality using JavaScript code, ensuring that the desired feature works as expected. Polyfills selectively provide support for specific features, allowing developers to write code using modern syntax and APIs, regardless of the target browser’s capabilities.</p><p>Polyfills are typically available as standalone libraries or can be bundled with other JavaScript code. Popular polyfill libraries like core-js and polyfill.io provide comprehensive support for a wide range of JavaScript features, making it easier to achieve cross-browser compatibility.</p><p>The example below depicts a scenario where polyfills come in handy. Math.trunc function does not exist in some outdated browsers; however, it is a valid and newer addition to the ever-evolving language. Since it is not a syntax change, there is no need to use a transpiler here. A simple function declaration like the code below would suffice.</p><pre>if (!Math.trunc) { // if no such function<br>  // implement it<br>  Math.trunc = function(number) {<br>    // Math.ceil and Math.floor exist even in ancient JavaScript engines<br>    // they are covered later in the tutorial<br>    return number &lt; 0 ? Math.ceil(number) : Math.floor(number);<br>  };<br>}</pre><p>In the ever-changing world of JavaScript development, transpilers and polyfills are indispensable tools for ensuring compatibility across different browsers and environments. Transpilers allow developers to leverage the power of modern JavaScript while maintaining backward compatibility, while polyfills extend the reach of modern features to older browsers. By understanding the differences between these tools and incorporating them into our development workflows, we can write robust and future-proof JavaScript applications that work seamlessly across a wide range of platforms.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dde4be10821f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>