<?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: Purneswar Prasad</title>
    <description>The latest articles on DEV Community by Purneswar Prasad (@purnez).</description>
    <link>https://dev.to/purnez</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%2F720376%2Ffe6fe382-d56e-44ad-b393-65075946c0f9.jpg</url>
      <title>DEV Community: Purneswar Prasad</title>
      <link>https://dev.to/purnez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/purnez"/>
    <language>en</language>
    <item>
      <title>A story on Frontend Architectures - SPA meets the enterprise! (Part-2)</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Fri, 19 Dec 2025 15:49:42 +0000</pubDate>
      <link>https://dev.to/purnez/a-story-on-frontend-architectures-spa-meets-the-enterprise-part-2-1kj6</link>
      <guid>https://dev.to/purnez/a-story-on-frontend-architectures-spa-meets-the-enterprise-part-2-1kj6</guid>
      <description>&lt;p&gt;&lt;em&gt;(... In &lt;a href="https://dev.to/purnez/a-story-on-frontend-architectures-spa-meets-the-enterprise-part-1-2e6n"&gt;Part-1&lt;/a&gt;, we established the foundation with definition of MFE and the basic of Module Federation.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's understand how the &lt;code&gt;remoteEntry.js&lt;/code&gt; file exposes a remote app from the shell with some real code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We'll do this in 3 layers:&lt;/p&gt;

&lt;p&gt;1) Remote app config&lt;br&gt;
2) What &lt;code&gt;remoteEntry.js&lt;/code&gt; exposes&lt;br&gt;
3) Shell app runtime code&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;1) Remote app Module Federation config&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//mfe/webpack.config.js

const {ModuleFederationPlugin} = require("webpack").container;

module.exports = {
  plugins: [
    new ModuleFederationPlugin({
      name: "cartApp"            //global container name
      filename: "remoteEntry.js" //this will be loaded by the shell
      exposes: {
        "./CartWidget" : "./src/CartWidget.js"  //exposed metadata
      shared: {
        react: {singleton: true },
        "react-dom": {singleton: true }
      }
    })
  ]
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's understand the plugin keys &lt;code&gt;exposes&lt;/code&gt; and &lt;code&gt;shared&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;exposes&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purpose&lt;/strong&gt;: declares what modules this remote makes available to others&lt;/li&gt;
&lt;li&gt;Use small composable public names like &lt;code&gt;./Header&lt;/code&gt;, &lt;code&gt;./routes&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Keep internal implementation hidden and only expose contracts.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;shared&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purpose&lt;/strong&gt;: negotiate shared dependencies and avoid duplicate of shared libraries like React. &lt;/li&gt;
&lt;li&gt;Implemented as a per-module &lt;code&gt;shared&lt;/code&gt; scope where providers(remote) register available versions and consumers(shell) request versions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;singleton: true&lt;/code&gt; ensures a single instance across containers (use for React, React DOM etc.)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;requiredVersion&lt;/code&gt; allows consumer to express the semantic version it expects&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strictVersion&lt;/code&gt; fails the negotiation if the version cannot be satisfied (dangerous for progressive migration).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;eager: true&lt;/code&gt; loads the shared module immediately (useful for small libs), but increases initial payload.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;So, with this config, the remote deploys &lt;code&gt;remoteEntry.js&lt;/code&gt; and exposes the module, but can still build independently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) What &lt;code&gt;remoteEntry.js&lt;/code&gt; exposes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After &lt;code&gt;remoteEntry.js&lt;/code&gt; loads in browser, Webpack registers a container(a JS object) under a global name which 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;window.cartApp = {
  // metadata about exposed modules
  get: async (moduleName) =&amp;gt; {
    // returns a FACTORY, not the module itself
  },

  init: async (shareScope) =&amp;gt; {
    // registers shared dependencies into global scope
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3) Shell app runtime code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The remoteEntry file can be loaded on the host in 2 different ways: &lt;strong&gt;static&lt;/strong&gt; and &lt;strong&gt;dynamic&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dynamic loading&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shell webpack config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// shell/webpack.config.js
const { ModuleFederationPlugin } = require("webpack").container;

module.exports = {
  plugins: [
    new ModuleFederationPlugin({
      name: "hostApp",
      remotes: {}, // 👈 NOTHING here
      shared: {
        react: { singleton: true },
        "react-dom": { singleton: true }
      }
    })
  ]
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the host bundle has no knowledge of the remotes.&lt;/p&gt;

&lt;p&gt;Let's look at the the core of the dynamic federation, runtime loader&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;loadRemote.js&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// shell/src/loadRemote.js

//idempotent script injection 

export function loadRemoteEntry(remoteUrl, scope) {
  return new Promise((resolve, reject) =&amp;gt; {
    if (window[scope]) return resolve(); // already loaded

    const script = document.createElement("script");
    script.src = remoteUrl;
    script.type = "text/javascript";
    script.async = true;

    script.onload = () =&amp;gt; {
      console.log(`${scope} remote loaded`);
      resolve();
    };

    script.onerror = () =&amp;gt; {
      reject(new Error(`Failed to load remoteEntry: ${remoteUrl}`));
    };

    document.head.appendChild(script);
  });
}

// turns the loaded remote app into an actual usable module

export async function loadRemoteModule(remoteUrl, scope, module) {
  // 1. Load remoteEntry.js
  await loadRemoteEntry(remoteUrl, scope);

  // 2. Initialize shared scope
  await __webpack_init_sharing__("default");

  // 3. Initialize the remote container
  const container = window[scope];
  await container.init(__webpack_share_scopes__.default);

  // 4. Get module factory
  const factory = await container.get(module);

  // 5. Execute factory
  return factory();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first function loads a dynamic remoteEntry.js file by doing a script injection(ensures that a remote’s remoteEntry.js is loaded exactly once, even if multiple parts of the application attempt to load it, preventing duplicate execution and runtime conflicts) &amp;amp; the second function makes the remote usable by exposing the module.&lt;/p&gt;

&lt;p&gt;Let's understand the details of the second function.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;await loadRemoteEntry(..)&lt;/code&gt; loads the remoteEntry file using the remoteUrl produced during the build&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;__webpack_init_sharing__&lt;/code&gt; and &lt;code&gt;__webpack_share_scopes__&lt;/code&gt; are provided by Webpack's runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;await __webpack_init_sharing__('default')&lt;/code&gt; ensures host shares are initialized&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;const container = window[scope]&lt;/code&gt; is the container registered by remoteEntry&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;container.init(...)&lt;/code&gt; registers the remote's shared modules&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;__webpack_init_sharing__('default')&lt;/code&gt; must be called before &lt;code&gt;container.init(...)&lt;/code&gt; to ensure host registered share scope exists, preventing undefined scope issues&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simple words:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Host says: “Here is the shared dependency table”&lt;/li&gt;
&lt;li&gt;Remote says: “Cool, I’ll register what I can share”&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Webpack decides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which React version to use&lt;/li&gt;
&lt;li&gt;ensures singleton rules&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;code&gt;container.get(module)&lt;/code&gt; returns a factory, which on invoked returns the actual module(component/object)&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Static loading&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Shell application declares the remote at build time&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// shell/webpack.config.js
const { ModuleFederationPlugin } = require("webpack").container;

module.exports = {
  plugins: [
    new ModuleFederationPlugin({
      name: "hostApp",
      remotes: {
        // 👇 STATIC binding (known at build time)
        cartApp: "cartApp@http://localhost:3001/remoteEntry.js"
      },
      shared: {
        react: { singleton: true },
        "react-dom": { singleton: true }
      }
    })
  ]
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the &lt;code&gt;**remotes**&lt;/code&gt; property helps the host reference an external container.&lt;/p&gt;

&lt;p&gt;The host &lt;strong&gt;already knows&lt;/strong&gt; the remote name and URL and Webpack bakes the remote mapping into the host bundle.&lt;/p&gt;

&lt;p&gt;Then, it can be imported like a local module&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// shell/src/App.js
import CartWidget from "cartApp/CartWidget";

export default function App() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Host Application&amp;lt;/h1&amp;gt;
      &amp;lt;CartWidget /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important things to note&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This import is not resolved at build time&lt;/li&gt;
&lt;li&gt;It is transformed by Webpack into a runtime fetch from remoteEntry&lt;/li&gt;
&lt;li&gt;Webpack automatically performs shared scope initialisation, container.init(), container.get() and factory execution that we saw earlier in dynamic loading &lt;strong&gt;behind the scenes&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So basically, in the background the import is rewritten by Webpack to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;await __webpack_init_sharing__("default");
const container = await loadRemoteContainer("cartApp");
await container.init(__webpack_share_scopes__.default);
const factory = await container.get("./CartWidget);
const CartWidget = factory();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Practical MFE wiring architecture  patterns
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; &lt;strong&gt;Simple host + static remotes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use when remote URLs are stable and managed tightly&lt;/li&gt;
&lt;li&gt;Shell webpack &lt;code&gt;remotes&lt;/code&gt; points to fixed URLs&lt;/li&gt;
&lt;li&gt;Low runtime complexity but also, low deployment flexibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; &lt;strong&gt;Host + dynamic remotes via manifest&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shell at runtime fetches a manifest JSON mapping remote name to URL&lt;/li&gt;
&lt;li&gt;Host uses the loader to inject remoteEntry.js&lt;/li&gt;
&lt;li&gt;Gives per-environment control and allows independent deployments and releases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; &lt;a href="https://youtu.be/wxnwPLLIJCY?si=IfQ3LYWup-t6NRrY" rel="noopener noreferrer"&gt;Single-spa for lifecycle + Module Federation for sharing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4)&lt;/strong&gt; &lt;a href="https://youtu.be/x63PIpqQME8?si=MF6jF5Jy9MwVbACn" rel="noopener noreferrer"&gt;SSR with Module Federation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Practical checklist for converting a monolith
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Pick a simple host that will control routing and layout&lt;/li&gt;
&lt;li&gt;Identify vertical slices(a single page or a low traffic route) as the first remote&lt;/li&gt;
&lt;li&gt;Make the shell load remoteEntry dynamically from a staging manifest&lt;/li&gt;
&lt;li&gt;Declare shared dependencies as singletons&lt;/li&gt;
&lt;li&gt;Smoke test integration of shell and remotes&lt;/li&gt;
&lt;li&gt;Ensure remotes publish a small contract file(exposed modules and versions) &amp;amp; shell CI validates compatibility&lt;/li&gt;
&lt;li&gt;Feature-flag route to new remote rollout&lt;/li&gt;
&lt;li&gt;Iterate the process by extracting more MFEs and investing in platform automation&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;To wrap it up, micro-frontends are not a silver bullet, but an &lt;strong&gt;organisational scaling tool&lt;/strong&gt; disguised as a frontend architecture. &lt;br&gt;
When teams, domains, and deployment velocity outgrow a single SPA, MFEs combined with Webpack Module Federation provide a pragmatic way to regain autonomy without sacrificing runtime cohesion. Used thoughtfully, they shift frontend engineering from &lt;em&gt;“shipping bundles”&lt;/em&gt; to composing systems at runtime. &lt;br&gt;
Used prematurely, they simply move complexity around and make your life harder. &lt;/p&gt;

&lt;p&gt;As with most architectural decisions, the real win comes not from the tooling, but from aligning it with organisational structure, ownership, and long-term business scale.&lt;/p&gt;

</description>
      <category>microfrontend</category>
      <category>frontend</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>A story on Frontend Architectures - SPA meets the enterprise (Part-1)</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Fri, 19 Dec 2025 15:46:24 +0000</pubDate>
      <link>https://dev.to/purnez/a-story-on-frontend-architectures-spa-meets-the-enterprise-part-1-2e6n</link>
      <guid>https://dev.to/purnez/a-story-on-frontend-architectures-spa-meets-the-enterprise-part-1-2e6n</guid>
      <description>&lt;p&gt;This post might not be useful for everyone. Yes, for starters this is definitely something you can try if you want to know how things work for any small application just to make your hands dirty and gain knowledge.&lt;br&gt;
If you're on a hobby project or a small company, deciding to do this might just be setting yourself up for failure. &lt;br&gt;
But if you're an enterprise with hundreds/thousands of employees working on an application, this might be your best bet at scalability and maintainability.&lt;/p&gt;

&lt;p&gt;Welcome to &lt;strong&gt;Micro-frontends&lt;/strong&gt; or &lt;strong&gt;MFEs&lt;/strong&gt;! You're right, it's micro services for the frontend.&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%2F2caemmeju7c3rfx2f4z4.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%2F2caemmeju7c3rfx2f4z4.png" alt=" " width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in this post, we'll be discussing 2 things broadly&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;the what and why of MFEs &lt;/li&gt;
&lt;li&gt;the how with &lt;strong&gt;Webpack Module Federation&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's start with knowing what a MFE is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microfrontend&lt;/strong&gt; is a self contained micro-app, much like a singular service in micro services architecture of the backend. Each micro-app can be handling a specific type of feature as needed by the organisation, a single business domain or a single feature. &lt;br&gt;
And it will have its own UI, logic, build and deploy pipeline too.&lt;/p&gt;

&lt;p&gt;And these micro-FEs need a host which is called &lt;strong&gt;shell application&lt;/strong&gt;. This composes the micro-apps into the final application page.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You may ask, &lt;em&gt;what was the need for MFEs?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As orgs scaled, their backend architecture with micro services was fairly easier to scale than their frontends. &lt;br&gt;
&lt;strong&gt;SPA frontends became large monoliths&lt;/strong&gt;, with a lot of developers contributing to the same enlarged codebase. And this sometimes, blocked parallel workstream teams.&lt;/p&gt;

&lt;p&gt;MFEs didn't just make teams leaner and modular, but also brought &lt;strong&gt;&lt;em&gt;domain-drive team boundaries&lt;/em&gt;&lt;/strong&gt; into the UI layer.&lt;/p&gt;

&lt;p&gt;From a business and technical POV, MFEs can be considered when there is a need for&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; Team autonomy - Separate ownership and pipelines reduces coordination friction &lt;br&gt;
&lt;strong&gt;2)&lt;/strong&gt; Heterogeneous technology with no framework constraint&lt;br&gt;
&lt;strong&gt;3)&lt;/strong&gt; No single-point-of-failure as error in one MFE is less likely to catastrophically affect others. Thus, deliverables can be scaled&lt;/p&gt;

&lt;p&gt;A business should &lt;strong&gt;NOT&lt;/strong&gt; use a MFE architecture, if it is a - &lt;strong&gt;(i)&lt;/strong&gt; small app, &lt;strong&gt;(ii)&lt;/strong&gt; small team or &lt;strong&gt;(iii)&lt;/strong&gt; cannot invest in platform engineering/QA/observability.&lt;/p&gt;

&lt;p&gt;Now that we've set the premise for MFEs, it's time to discuss the internal working and flow in these micro apps. And for that, we'll be learning a concept from the Webpack bundler called &lt;strong&gt;Module Federation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before jumping into Module Federation, let's set the ground with a few concepts.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;1. Bundlers &amp;amp; the traditional build-time model&lt;/strong&gt;&lt;br&gt;
Modern frontend apps use bundlers like Webpack and Vite that resolve all imports at &lt;strong&gt;build time&lt;/strong&gt;, producing a single or a few static bundles shipped to the browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Problem with build-time coupling&lt;/strong&gt;&lt;br&gt;
In traditional SPAs, every dependency must be known during build time. Which means, a small change requires an entire rebuild and redeploy of the entire FE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Runtime vs Build-time composition&lt;/strong&gt;&lt;br&gt;
Traditional FEs rely on build-time composition, but MFEs load, connect and execute different applications while the app is running. Thus the need of build-time composition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Need for shared dependencies&lt;/strong&gt;&lt;br&gt;
In MFE architecture, given the number of different applications, loading multiple copies of large libraries like React is inefficient and dangerous. Thus, these must exist as &lt;strong&gt;singletons&lt;/strong&gt; to avoid runtime bugs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Independent deployment as a primary need&lt;/strong&gt;&lt;br&gt;
MFEs are not just about code splitting - they're also about enabling teams to work faster, deploy independently and scale at their own pace.&lt;br&gt;
This requires a system that can &lt;strong&gt;consume code it didn't know about at build time&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Webpack Module Federation&lt;/strong&gt; is Webpack’s answer to these problems.&lt;/p&gt;

&lt;p&gt;Webpack Module Federation is a runtime feature introduced in &lt;strong&gt;Webpack 5&lt;/strong&gt;, that allows independently built bundles load and &lt;br&gt;
share modules from other apps at runtime. It is one of the most practical technical ways to implement MFEs because it lets those microamps to share code and import each other's modules without rebuilding the whole shell.&lt;/p&gt;

&lt;p&gt;Now let's see how the "how" works!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Roles&lt;/strong&gt;
&lt;/h3&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%2Fcey86n0zdz4qn6dsrbno.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%2Fcey86n0zdz4qn6dsrbno.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Host(&lt;strong&gt;Shell&lt;/strong&gt;): This is the orchestrator. It consists of global layout, global routing, authentication orchestration and top-level error handling.&lt;br&gt;
It may also supply global CSS variables and the manifest that &lt;strong&gt;maps remote names to URLs&lt;/strong&gt;.&lt;br&gt;
It decides &lt;strong&gt;when and how to load remotes&lt;/strong&gt; and provide shared infrastructure like auth token refresh.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remote(&lt;strong&gt;MFE&lt;/strong&gt;): This is an independently built app that owns a business domain/feature. It exposes one or more modules like components via Module Federation's &lt;code&gt;exposes&lt;/code&gt; key.&lt;br&gt;
It has its own CI/CD and publishes a &lt;code&gt;remoteEntry.js&lt;/code&gt; file and other static assets.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is &lt;code&gt;remoteEntry.js&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This is the bootstrap/manifest file that Webpack emits for a federated(runtime-composed) build. 
It registers a container(a JS object) which exposes an API to:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;initialise shared scopes&lt;/strong&gt; - a place where Webpack coordinates shared dependencies like React, lodash and loads code form each other at runtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;get()&lt;/code&gt; factories for exposed modules&lt;/strong&gt; - A factory function that can create the module that is asked for. A factory is needed because the module might not be loaded yet and the shared dependencies must be resolved first. Thus, for Webpack to control the flow of execution.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(to be continued .....)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Tune in to &lt;a href="https://dev.to/purnez/a-story-on-frontend-architectures-spa-meets-the-enterprise-part-2-1kj6"&gt;Part-2&lt;/a&gt; for more internals and deep-dive!&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>architecture</category>
      <category>webdev</category>
      <category>microfrontend</category>
    </item>
    <item>
      <title>A story on Frontend Architectures - Back to the Future</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Fri, 19 Dec 2025 00:04:49 +0000</pubDate>
      <link>https://dev.to/purnez/a-story-on-frontend-architectures-back-to-the-future-gdc</link>
      <guid>https://dev.to/purnez/a-story-on-frontend-architectures-back-to-the-future-gdc</guid>
      <description>&lt;p&gt;Till now we have talked a lot about how architectures have evolved from magazine-looking webpages to animation and transition heavy websites, with different architectural ideas to ship faster, better and more reliably.&lt;/p&gt;

&lt;p&gt;A lot of these ideas focused more on how to efficiently use the backend to serve the frontend better. And as it happened, we developers gradually started shipping a truck load of JavaScript into the websites with SPAs. &lt;br&gt;
For sure, it made them more interactive, but on the other hand, users were left to see a site loading very slowly with all the JS shot into it.&lt;/p&gt;

&lt;p&gt;Think of a webpage as a canvas. HTML forms the borders, CSS addeds some colors and shapes and JS is the artist that brings in the details.&lt;/p&gt;

&lt;p&gt;In a SPA heavy world, we started handing over too much of this painting work to JS. Refer to the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82fhb592rncwpkqqupv8.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%2F82fhb592rncwpkqqupv8.png" alt=" " width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The browser may have already received the &lt;strong&gt;first byte&lt;/strong&gt;, even painted something on the screen(&lt;strong&gt;First Contentful Paint&lt;/strong&gt;), but there's no actual use of it.&lt;br&gt;
The main content arrives late(&lt;strong&gt;Largest Contentful Paint (LCP)&lt;/strong&gt;), but clicks still feel unresponsive since the JS thread is busy(&lt;strong&gt;First Input Delay&lt;/strong&gt;) and layouts keep jumping as scripts keep laoding(&lt;strong&gt;Cumulative Layout Shift&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;So while the page looks like it’s loading, the user experience is stuck in limbo...&lt;em&gt;Is it happening? Is it useful? Is it usable?&lt;/em&gt; &lt;br&gt;
This gap between “something is visible” and “I can actually interact” became the biggest pain of SPAs, and it’s precisely this problem that pushed the ecosystem to rethink &lt;strong&gt;rendering strategies&lt;/strong&gt; beyond shipping a truckload of JavaScript to the client.&lt;/p&gt;

&lt;p&gt;In this story, we discuss how the future asked us to go back to the server era, different strategies that makes the web faster and brought the "next" innovative architectural pattern, their advantages and disadvantages and suitable use case scenarios&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; CSR - &lt;strong&gt;Client Side Rendering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9phyhp5rf2bw963ez5yj.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%2F9phyhp5rf2bw963ez5yj.png" alt="CSR" width="800" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the generic rendering idea where the client does almost all of the heavy lifting, fetches data from the server and renders UI at the runtime. Rendering work is minimal at build time, but bundling and optimization may still be complex, with an entire app bundle is produced in the build stage. &lt;br&gt;
Here the user experience is powerful gives rich interactivity after load. But initial experience is often poor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;blank screen&lt;/li&gt;
&lt;li&gt;loading spinners&lt;/li&gt;
&lt;li&gt;JS parse + execution delays&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the classic slow FCP / LCP problem.&lt;/p&gt;

&lt;p&gt;This type of rendering is suitable for highly interactive apps where SEO/page-first render matters less. E.g - internal dashboards, SPAs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; SSG - &lt;strong&gt;Static Site Generation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj570id2lc9qx1ysjl64t.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%2Fj570id2lc9qx1ysjl64t.png" alt="SSG" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When speed is in question, frontend teams needed something else. That's where pre-rendering came to the rescue. &lt;br&gt;
Pre-rendering is building HTML ahead of time and serve it from a data store like CDN. Instead of fetching data per request on the server, data is fetched at build time. So, there can be some static content that can be served instantly and thus an ultra low &lt;strong&gt;TTFB&lt;/strong&gt;(Time Taken to First Byte).&lt;br&gt;
The build process is very long here since the pages are fully rendered at build time and the server just serves this pre-built HTML. The client has small to moderate JS for interactivity and some hydration may be needed for interactive widgets.&lt;/p&gt;

&lt;p&gt;This type of rendering strategy works best for sites which need better SEO, for e.g. docs, marketing, blogs etc&lt;/p&gt;

&lt;p&gt;And similarly, if content on the site changes frequently, SSG can be a problem since the content it serves might be stale until the next build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; SSR - &lt;strong&gt;Server Side Rendering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgz3yku37qxfztmmii8sh.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%2Fgz3yku37qxfztmmii8sh.png" alt=" " width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is kind of an improvement on the SSG strategy for speed, scale and content freshness. &lt;br&gt;
Here, instead of building entire pages in the build stage, app bundles are built.&lt;br&gt;
On every request from the client to the server, pages are rendered in the server and served fresh. So there is always fresh data and better personalisation/SEO for dynamic content. The client runs the interactive parts and hydrates the server HTML.&lt;/p&gt;

&lt;p&gt;Highly dynamic/personalised pages and real-time dashboards that must be up-to-the-second on every request (&lt;em&gt;&lt;strong&gt;Don't Confuse&lt;/strong&gt;: SSR only helps with initial HTML, not real-time updates&lt;/em&gt;) use this kind of rendering.&lt;/p&gt;

&lt;p&gt;Since the server renders and sends this as a response on client request, there is a higher per-request compute and latency than cached static HTML. &lt;br&gt;
Also, it is harder to scale without caching strategies, given the heavy load on the server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4)&lt;/strong&gt; ISR - &lt;strong&gt;Incremental Site Regeneration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53g4oilnfbw2e114353i.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%2F53g4oilnfbw2e114353i.png" alt=" " width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a rendering strategy pioneered by the framework, Next.JS. It was invented to get the best of SSG and SSR i.e. serve static cached pages from CDN for speed, but also allow selected pages to be &lt;strong&gt;re-generated&lt;/strong&gt; (on-demand or after a &lt;code&gt;revalidate&lt;/code&gt; period) without a full rebuild.&lt;/p&gt;

&lt;p&gt;Let's understand why ISR came into the picture. Before:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;1) SSG was fast but couldn't update without a fresh rebuild of the entire site.&lt;br&gt;
2) SSR was fresh, but slower and more expensive.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ISR brought in both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Static performance&lt;/strong&gt;, serving cached pages instantly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic freshness&lt;/strong&gt;, regenerating only pages that need updating&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incremental updates&lt;/strong&gt;, so build time stays low even for large sites&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To understand ISR in action, which is very important for further discussion, please follow &lt;a href="https://youtu.be/8Iz3NtUpxQw?si=QwNSBCyVP7BAhMVs" rel="noopener noreferrer"&gt;this video&lt;/a&gt;, where there has been a very clear implementation of the concept.&lt;/p&gt;

&lt;p&gt;For implementation of ISR, there needs to be a specific key called &lt;code&gt;revalidate&lt;/code&gt;. This holds a value which tells the server when to regenerate the page.&lt;/p&gt;

&lt;p&gt;But there is a small twist here, which might make you question how is this a good mechanism to keep the freshness of the site.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For example: &lt;code&gt;revalidate: 60&lt;/code&gt;&lt;br&gt;
Let's go through the timelines&lt;/p&gt;

&lt;p&gt;Page generated at &lt;code&gt;t = 0&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cached globally&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;t = 1 → 60&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All requests get cached HTML&lt;/li&gt;
&lt;li&gt;No regeneration allowed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;t = 61&lt;/code&gt; (first request after expiry)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Old HTML is served instantly&lt;/li&gt;
&lt;li&gt;Background regeneration starts&lt;/li&gt;
&lt;li&gt;User never waits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;t = 62+&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regeneration finishes&lt;/li&gt;
&lt;li&gt;Cache is replaced&lt;/li&gt;
&lt;li&gt;All future users get fresh content&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now you might think at t=61, when a request is sent, why is the old HTML is served instantly rather than the fresh one?&lt;/p&gt;

&lt;p&gt;This is a &lt;strong&gt;deliberate design decision&lt;/strong&gt;. Some reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; &lt;strong&gt;Speed &amp;gt; Freshness&lt;/strong&gt; - Users prefer instant pages over perfectly fresh but slow ones.&lt;/p&gt;

&lt;p&gt;Users care far more about:&lt;br&gt;
“Did the page load instantly?”&lt;br&gt;
than&lt;br&gt;
“Is this data 10–60 seconds old?”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; Only &lt;strong&gt;ONE request&lt;/strong&gt; ever sees stale-after-expiry&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first request after expiry triggers regeneration&lt;/li&gt;
&lt;li&gt;Everyone after that gets fresh content&lt;/li&gt;
&lt;li&gt;There is no cascade of stale responses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is called &lt;a href="https://vercel.com/docs/request-collapsing" rel="noopener noreferrer"&gt;request collapsing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; &lt;strong&gt;No blocking&lt;/strong&gt; - Regeneration never delays a response&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4)&lt;/strong&gt; Most users &lt;strong&gt;never refresh immediately&lt;/strong&gt; and by the time they do, cache is already updated&lt;/p&gt;

&lt;p&gt;And there is also the option to have &lt;strong&gt;&lt;em&gt;on-demand validation&lt;/em&gt;&lt;/strong&gt; using web hooks from the database when content is updated. This can result in &lt;strong&gt;no user seeing any stale content&lt;/strong&gt; and still &lt;strong&gt;remain static-fast&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This type of rendering strategy will only be helpful where there is mostly static but periodically updating content, need for a good SEO and has a lot of pages. E.g.- blogs, documentation, product detail pages, category pages etc.&lt;/p&gt;

&lt;p&gt;Do NOT use ISR for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time data (stocks, live scores)&lt;/li&gt;
&lt;li&gt;User-specific dashboards&lt;/li&gt;
&lt;li&gt;Financially critical per-request accuracy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically places where the needs are of a real-time rendering, user-specific rendering, background crawling of all pages etc., ISR should not be used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5)&lt;/strong&gt; RSC - &lt;strong&gt;React Server Components&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's run back the clock a bit to see how servers and clients interacted to show sites on the browser.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;CSR&lt;/strong&gt;, in applications written in React, when a particular request goes from the client to the server, server sends a minimal HTML shell that references the JS bundle, and the browser sets itself to download this bundle on the client. &lt;br&gt;
Then the rendering shell makes API calls to the backend, which may query the database and this is the point where the user starts to see something on the screen, even if they're non-interactable. &lt;br&gt;
This often results in poor or unreliable SEO due to delayed content visibility.&lt;/p&gt;

&lt;p&gt;To solve this issue of a very late "First Paint" as well as SEO, &lt;strong&gt;Next.js&lt;/strong&gt; brought in the concept of &lt;strong&gt;SSR&lt;/strong&gt;. In this, the rendering shell along with its queries to the DB goes to the server and returns a fully rendered HTML document (with CSS links), allowing content to appear immediately and thus, reducing the First paint time by a margin. &lt;br&gt;
Then the JS bundle starts to download in the background on the client and a process of hydration occurs, where the event listeners and other interactive components get attached to the static page, making it interactable.&lt;/p&gt;

&lt;p&gt;But even here, if you had noticed, there is  a problem. There is always the download of a big JS bundle on the client, which slows down the time to show an interactive screen.&lt;/p&gt;

&lt;p&gt;Comes the eureka moment - server components!&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%2Fjs0157v6iev97hh8gsof.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%2Fjs0157v6iev97hh8gsof.png" alt=" " width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Think like this:&lt;br&gt;
If you had an application with 20 components, and among them 15 of them just show some image, text or in general, non interactable components, why do you need to do it on the client and fetch info from the server? &lt;br&gt;
You can just do it on the server itself and not put it in the JS bundle sent on the client! And in turn, reduce client-side JavaScript, memory usage, and hydration cost.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You might think, "but this is just SSR again right?". Well not exactly. This is where RSC is not SSR.&lt;/p&gt;

&lt;p&gt;What SSR sends:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;Then ships JS&lt;/li&gt;
&lt;li&gt;Then hydrates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What RSC sends:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;serialized React component tree&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Often called the “React Flight” payload&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This payload is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not HTML&lt;/li&gt;
&lt;li&gt;Not JS source code&lt;/li&gt;
&lt;li&gt;A structured description of the UI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The client:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reconstructs the React tree&lt;/li&gt;
&lt;li&gt;Inserts it into the DOM&lt;/li&gt;
&lt;li&gt;Without executing server component JS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So from your 20 components, you just do the same SSR process for your 5 interactive components are shipped, hydrated, and executed on the client, reducing your JS bundle size significantly!&lt;/p&gt;

&lt;p&gt;RSC is designed to work with &lt;a href="https://react.dev/reference/react/Suspense" rel="noopener noreferrer"&gt;&lt;strong&gt;React Suspense&lt;/strong&gt;&lt;/a&gt;, allowing streaming chunks of UI, progressive rendering from server and streaming support.&lt;/p&gt;

&lt;p&gt;All of this needed a framework because it needs:&lt;br&gt;
1) A bundler that understands server/client boundaries&lt;br&gt;
2) A server runtime&lt;br&gt;
3) Streaming support&lt;br&gt;
4) Routing integration&lt;/p&gt;

&lt;p&gt;And that's why Next.js 13 App Router became the first mainstream RSC implementation&lt;br&gt;
&amp;amp; RSC is not usable in plain CRA/Vite alone.&lt;/p&gt;

&lt;p&gt;The evolution from CSR to SSG, SSR, ISR and finally React Server Components shows that frontend architecture has never been about choosing one “best” rendering strategy, but about placing work where it makes the most sense. &lt;/p&gt;

&lt;p&gt;As we pushed more logic to the client, performance suffered; as we brought it back to the server, the web became faster and more usable again. &lt;br&gt;
Modern frameworks now let us mix these strategies thoughtfully—balancing speed, freshness, interactivity and scale—rather than overloading the browser with work it was never meant to do. The future of the web isn’t client-first or server-first, but responsibility-first.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>reactservercomponents</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>A story on Frontend Architectures - Everyone deserves a BFF!</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Sun, 14 Dec 2025 17:58:21 +0000</pubDate>
      <link>https://dev.to/purnez/a-story-on-frontend-architectures-everyone-deserves-a-bff-k27</link>
      <guid>https://dev.to/purnez/a-story-on-frontend-architectures-everyone-deserves-a-bff-k27</guid>
      <description>&lt;p&gt;SPAs were revolutionary and ground-breaking in the way they changed frontend architectures and shifting the entire view of the data-model(pun intended). &lt;/p&gt;

&lt;p&gt;A lot of UI and data-shaping work came into the browser which created client-specific needs. Let's discuss a few of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; &lt;strong&gt;Different shapes of the payload&lt;/strong&gt; - There can be case of over and under fetching when a generic API is used. It sends too much data for one client and too less for another, thus forcing clients to request multiple endpoints and waste bandwidth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; &lt;strong&gt;Juggling between microservices&lt;/strong&gt; - SPAs often need to call multiple microservices, join results and shape them for the view. This increases complexity and hurts performance.&lt;br&gt;
auth/token handling&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; &lt;strong&gt;Mobile device handling&lt;/strong&gt;  - Mobile apps, TV apps or web SPAs have different payload, caching and security requirements. One API fits all is bound to fail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; &lt;strong&gt;Organisational bottlenecks&lt;/strong&gt; - With a single backend, the dependency of the frontend team for minor API changes results in slower delivery timelines.&lt;/p&gt;

&lt;p&gt;Let's understand through an example.&lt;/p&gt;

&lt;p&gt;Suppose you've an web-based e-commerce application which has an API /v1/products/102938 showing the details of a certain product as follows -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "productId": "PROD-102938",
  "name": "ZenBeat Pro Wireless Noise Cancelling Headphones",
  "description": "Wireless headphones with active noise cancellation, deep bass, and long-lasting battery life.",
  "seller": {
    "sellerId": "SELL-908",
    "name": "ZenBeat Official Store",
    "rating": 4.6
  },
  "variants": [
    {
      "variantId": "VAR-1",
      "label": "Black",
      "price": 9999,
      "inStock": true
    },
    {
      "variantId": "VAR-2",
      "label": "Silver",
      "price": 10499,
      "inStock": false
    },
  ],
  "reviews": {
    "averageRating": 4.4,
    "totalReviews": 612,
    "topReviews": [
      {
        "reviewId": "REV-1",
        "rating": 5,
        "comment": "Excellent sound quality and very comfortable for long use."
      },
      {
        "reviewId": "REV-2",
        "rating": 4,
        "comment": "Great noise cancellation, battery life could be slightly better."
      },
    ]
  },
  "faqs": [
    {
      "question": "Does this support fast charging?",
      "answer": "Yes, it supports fast charging and provides up to 5 hours of playback with a 10-minute charge."
    },
    {
      "question": "Is there a warranty?",
      "answer": "Yes, it comes with a 1-year manufacturer warranty."
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now to render data for a response like this on a mobile app would be very different to that of a mobile app given the limited real estate on the device. Probably in a mobile app, we would show the "faqs" on click of a button which would be another API call.&lt;/p&gt;

&lt;p&gt;With lesser and different set of response, we get&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a better UX&lt;/li&gt;
&lt;li&gt;faster rendering times&lt;/li&gt;
&lt;li&gt;save on network bandwidth&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And this doesn't just apply to mobile, but for any other client which might work better with a different API response than a single monolith API.&lt;/p&gt;

&lt;p&gt;To deal with this mismatch and give each client(TV, mobile, web) their own backend, emerged the pattern of &lt;strong&gt;Backend for Frontend(BFF)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgzx2d0dizkzrftajnsvy.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%2Fgzx2d0dizkzrftajnsvy.png" alt=" " width="709" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea here is to have an intermediate layer between the client and the backend. And mind that, this layer is completely to assist the client i.e presentation logic and there is NO business logic involved here. Imagine this, instead of a single API gateway, we have multiple API gateways for every type of client.&lt;/p&gt;

&lt;p&gt;Let's understand 2 different use cases of a BFF for different types of backends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. BFF and Monolith&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttmy2fnrjcefizghywx2.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%2Fttmy2fnrjcefizghywx2.png" alt=" " width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With a monolith API architecture, the BFF does the work of filtering responses and provides a specific entry point as per the client needs.&lt;/p&gt;

&lt;p&gt;Each BFF decides&lt;br&gt;
1) what it needs to fetch&lt;br&gt;
2) how it needs to fetch&lt;br&gt;
3) what needs to be sent in&lt;/p&gt;

&lt;p&gt;A mobile BFF can remove the responses which might be unnecessary to be displayed on the mobile screen, like reviews or FAQs, while a desktop BFF can keep those additional details.&lt;/p&gt;

&lt;p&gt;Here, you might think, why would we fetch all kinds of data from the backend if we're eventually going to drop it?&lt;br&gt;
Yes, you're not wrong. We can use a flag, like &lt;code&gt;device=mobile&lt;/code&gt; and filter the responses sent from the backend accordingly. &lt;br&gt;
But this also complicates the backend logic and we try to keep the backend as generic as possible. &lt;br&gt;
And on top, having a BFF layer with all the responses coming in, gives the advantage of caching responses to be used later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. BFF and Microservices&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85udql3vaymecp6b7jwj.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%2F85udql3vaymecp6b7jwj.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With a micro-service backend architecture, the BFF only picks those services which it requires in the catalogue of services. &lt;br&gt;
In the picture above, a mobile client would benefit from a AR service to imagine any product in a real-life 3D visual, which would be absolutely unnecessary in the web client.&lt;/p&gt;

&lt;p&gt;Now let's discuss some pros and cons of this middle-man!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;There is now a support for different types of interfaces in their own isolated manner&lt;/li&gt;
&lt;li&gt;Any particular client specific tweaks can be executed much &lt;strong&gt;faster&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Since backend is not directly exposed, there can be &lt;strong&gt;filtering of any sensitive data&lt;/strong&gt; at the BFF layer&lt;/li&gt;
&lt;li&gt;BFFs can also act as a &lt;strong&gt;mediator between the stack/protocols&lt;/strong&gt; that is being used by the client and the server, thus making it seamless.
For e.g., if a legacy client uses XML but gets JSON from the backend, BFFs can act as a transformation layer.&lt;/li&gt;
&lt;li&gt;Given different client interfaces are treated separately, the &lt;strong&gt;security concerns can be addressed separately&lt;/strong&gt; and in a much better way. There need not to have all kinds of security checks for every client.&lt;/li&gt;
&lt;li&gt;BFFs help make &lt;strong&gt;a generic backend&lt;/strong&gt;, putting the heavy load of customisation upon itself. And thus, acts as a request aggregator, making the client lightweight.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;On the same lines of the last advantage point, fanning out or sending requests out from a single source(BFF) to multiple micro-services concurrently, can be &lt;strong&gt;network heavy&lt;/strong&gt;.
The choice of language and runtime is therefore crucial. Languages with efficient, non-blocking concurrency models (such as Node.js, Go or &lt;a href="https://solutionsarchitecture.medium.com/reactive-programming-in-java-a-simplified-guide-dd24d7f440d4" rel="noopener noreferrer"&gt;reactive Java&lt;/a&gt;) are better suited for handling high levels of parallel I/O without incurring excessive thread or memory overhead.&lt;/li&gt;
&lt;li&gt;Code for multiple BFFs would mostly be the same(as seen previously, both web and mobile would need Product details and Seller details services) with minor tweaks here and there, which results in &lt;strong&gt;code duplication&lt;/strong&gt;, which increases developer efforts.&lt;/li&gt;
&lt;li&gt;With the addition of a new moving layer, comes in the pain of &lt;strong&gt;managing, maintaining and monitoring&lt;/strong&gt; it.&lt;/li&gt;
&lt;li&gt;Having a new layer adds an extra network hop and in turn &lt;strong&gt;increases the latency&lt;/strong&gt; of the application. 
Some applications like e-commerce apps or fintech dashboards benefit from it given their presence on multiple devices. But this would really harm the performance of real-time systems like High frequency trading.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;After this entire discussion, it is definitely a head-scratcher to decide when to have this BFF in your system. Here are some real use-cases where a BFF seems very much handy and useful.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; When the client interfaces are &lt;em&gt;significantly different&lt;/em&gt; from each other, BFF brings in a heap load of advantages. The backend stays generic and simple and multiple BFFs can serve the multiple clients as per their need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Format of communication of the client is very different. Suppose a legacy client using XML to render information has a backend with JSON responses. Here the conversion can be handled by XML with the use of a XML BFF.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One should also note that, given the complexity of the application resulting after the integration of another layer(BFF), increases the team size and product value than a SPA.&lt;/p&gt;

&lt;p&gt;A BFF is not a default architectural choice(contrary to the actual need of a Best Friend Forever lol), but a conscious trade-off. It shines when client experiences diverge, payloads and protocols vary, and frontend teams need speed and autonomy, while keeping the core backend clean and generic, empowering modern, multi-device applications.&lt;/p&gt;

</description>
      <category>backendforfrontend</category>
      <category>architecture</category>
      <category>frontend</category>
      <category>mobile</category>
    </item>
    <item>
      <title>A story on Frontend Architectures - Birth of the FE engineer</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Fri, 12 Dec 2025 19:33:47 +0000</pubDate>
      <link>https://dev.to/purnez/a-story-on-frontend-architectures-birth-of-the-fe-engineer-12nm</link>
      <guid>https://dev.to/purnez/a-story-on-frontend-architectures-birth-of-the-fe-engineer-12nm</guid>
      <description>&lt;p&gt;With the last 2 blogs, we understood a lot about application architecture patterns and how isolation of business logic and the code is an essential element at an organisational level. A small decision wrongly taken before building the application can lead to inconsistencies later in the application stage, where a change can be  too costly(both in time and money) to incur.&lt;/p&gt;

&lt;p&gt;But since we're talking about Frontend Architecture patterns, it's very essential to understand how the entire page gets delivered and updated to the user too, So going forward, we'll discuss more about application-level architectures for web products like: &lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SPAs&lt;/strong&gt; (React, Vue, Angular — client-rendered)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BFF&lt;/strong&gt; (Backend for Frontend)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSG/ISR/SSR&lt;/strong&gt; (Next.js, Nuxt, Astro)&lt;/li&gt;
&lt;li&gt;Frontend &lt;strong&gt;Monoliths&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microfrontends&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this blog, we'll learn about how &lt;strong&gt;SPA(Single Page Applications)&lt;/strong&gt; came into the picture and what did they bring to the table.&lt;/p&gt;

&lt;p&gt;Before SPAs, there were &lt;strong&gt;MPAs&lt;/strong&gt; or Multi Page Applications. These, as the name suggests, were Multi because of the way they rendered pages. Every interaction rendered a new HTML page, reloading the old screen. These were mostly server-controlled applications (thin client) with very minimal JS dependency, but very slow UX.&lt;/p&gt;

&lt;p&gt;To resolve this issue of entire page reload, &lt;strong&gt;AJAX&lt;/strong&gt; was born. AJAX stands for &lt;strong&gt;Asynchronous JavaScript and XML&lt;/strong&gt;. It introduced the &lt;strong&gt;XMLHttpRequest (XHR)&lt;/strong&gt; API, letting pages request data without reloading. This is called &lt;em&gt;partial updates&lt;/em&gt;. The concept of &lt;strong&gt;Promises&lt;/strong&gt; and callbacks was born, later which came to be known as &lt;code&gt;fetch()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But as apps grew, thus grew the need of a faster JS execution speed. Doing DOM manipulations and complex UI logic on slower JS engines was painful. And also maintaining apps with so many XHR calls and DOM changes turned out be a challenge. Thus came, probably one of the most revolutionary moment in web development history, Google's &lt;strong&gt;V8&lt;/strong&gt; engine.&lt;/p&gt;

&lt;p&gt;V8, at a high level:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;introduced &lt;strong&gt;JIT&lt;/strong&gt;(Just In Time) compilation, which compiled JS code to native machine code instead of line-by-line interpretation&lt;/li&gt;
&lt;li&gt;implemented optimisations like hidden classes, inline caching, and a modern garbage collector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also enabled the creation of &lt;strong&gt;Node.js&lt;/strong&gt; (2009) and huge server/client ecosystem growth. Here's a &lt;a href="https://youtu.be/2WJL19wDH68?si=5xF4fSkSNyDWgJXZ" rel="noopener noreferrer"&gt;video&lt;/a&gt; on JS Engine internals and the V8's architecture in detail.&lt;/p&gt;

&lt;p&gt;These pieces along with some others like client-side routing(&lt;code&gt;history&lt;/code&gt; API), concept of virtual DOM and componentization of modules, bundlers together produced single page capabilities: no reload on navigation, client-rendered UIs and modular code.&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%2Fpw81viodsdut6rhcrdh0.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%2Fpw81viodsdut6rhcrdh0.png" alt=" " width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With all these benefits, SPAs can be considered as a landmark in frontend engineering and quite honestly gave rise to the role of a &lt;em&gt;frontend engineer&lt;/em&gt;. There is an option for a lot more interactivity and complex engineering ideas to be implemented on the web and thus came the, quite infamous, rise of dashboards and SaaS. And this in turn, was adopted and some groundbreaking libraries were created by top product companies.&lt;/p&gt;

&lt;p&gt;The evolution continues — SPAs didn’t end the story; they changed it...&lt;/p&gt;

</description>
      <category>react</category>
      <category>frontend</category>
      <category>architecture</category>
      <category>spa</category>
    </item>
    <item>
      <title>A story on Frontend Architectures - MVVM, the Separation of Concerns</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Wed, 10 Dec 2025 09:22:19 +0000</pubDate>
      <link>https://dev.to/purnez/a-story-on-frontend-architectures-mvvm-the-separation-of-concerns-imf</link>
      <guid>https://dev.to/purnez/a-story-on-frontend-architectures-mvvm-the-separation-of-concerns-imf</guid>
      <description>&lt;p&gt;We read earlier on how MVC marked a shift in engineering thinking and architectural patterns, coming from no structure at all while writing code to having a clear triad in the form of MVC while creating an application.&lt;/p&gt;

&lt;p&gt;Although MVC as a concept at its birth was more of a server-heavy architecture with most of the processing load on the Controller and the View layer just managing user input and for displaying data on the screen.&lt;/p&gt;

&lt;p&gt;When we're along these lines, let's know of 2 more things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Thin Client&lt;/strong&gt; - As the name suggests, here the client is thin, or it is involved in a lot less workload than the server. These are the kind of architectures followed in traditional multi-page applications or static sites.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thick Client&lt;/strong&gt; - This is just the reverse of the above, where significant data processing happens on the client side. 
For e.g.- Single Page Applications, offline-first applications etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But this was not a very prominent concept back in the day when applications were a lot less interactive. Modern web-apps follow a thick client architecture.&lt;/p&gt;

&lt;p&gt;Let's see how a modern MVC web-app looks like &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%2Fz0mwlisd4h8758wyljl5.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%2Fz0mwlisd4h8758wyljl5.png" alt=" " width="634" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Modern MVC apps don't need a backend server, they can work purely on the frontend itself with &lt;a href="https://medium.com/@info_52759/redux-a-state-management-guide-908a2339031c" rel="noopener noreferrer"&gt;Redux&lt;/a&gt; state management working as Model, &lt;a href="https://legacy.reactjs.org/docs/hooks-intro.html" rel="noopener noreferrer"&gt;Hooks&lt;/a&gt; as the Controller and React components as the View layer.&lt;/p&gt;

&lt;p&gt;And extending on the same logic, there was the inception of HMVC (Hierarchical MVCs), where instead of having a single MVC structure across the system, we break down the app into nested modular MVC components. &lt;br&gt;
Much like the modern-day structure:&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%2Fnjot35wunf9jhvuf9wxc.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%2Fnjot35wunf9jhvuf9wxc.png" alt=" " width="516" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But MVC weren't the last-stop solution. In-fact the concept gave rise to a lot of discussions and possible improvements. For the pros, they are easy to understand, develop and maintain.&lt;/p&gt;

&lt;p&gt;But on the cons, with increasing complexity and sophistication in applications the boundary between the different layers start looking blurry. &lt;br&gt;
Let's take the case of a &lt;em&gt;&lt;strong&gt;fat controller&lt;/strong&gt;&lt;/em&gt;. A fat controller is what the controller started turning into as the handling of events got passed down from the View. It has to send requests to the server, handle API responses, sync data with the backend and also do client-side caching.&lt;/p&gt;

&lt;p&gt;And so comes the next architectural pattern, a change focusing on differentiating the UI and business logic entirely: &lt;strong&gt;MVVM&lt;/strong&gt;(Model-View-ViewModel)&lt;/p&gt;

&lt;p&gt;Let's understand the difference between the UI and business logic.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UI/View Logic&lt;/th&gt;
&lt;th&gt;Business logic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Closing a window&lt;/td&gt;
&lt;td&gt;Changing the username&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disabling a button&lt;/td&gt;
&lt;td&gt;Making a transaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Updating the download status&lt;/td&gt;
&lt;td&gt;Updating wishlist content&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;How does MVVM differs between the View and Business logic?&lt;/p&gt;

&lt;p&gt;The Model - consists of the domain data(e.g. User, Order, Invoice, + services like userApi, authService, etc.) and business rules (cart must have at least one item to checkout)&lt;/p&gt;

&lt;p&gt;The View - actual UI the user sees, which in React us implemented by the JSX.&lt;/p&gt;

&lt;p&gt;And here, instead of the Controller, which earlier used to handle requests and decide what happens next, is now replaced by the &lt;strong&gt;View Model&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffsj5zwpe7h3rkcyd7fon.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%2Ffsj5zwpe7h3rkcyd7fon.png" alt=" " width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;View Model is the brain sitting between the View and the Model. It exposes state and actions is a View-friendly form.&lt;/p&gt;
&lt;h3&gt;
  
  
  How MVVM separates them
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Views:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Render JSX based on props and ViewModel state.&lt;/li&gt;
&lt;li&gt;Call ViewModel methods on user actions (onClick, onChange etc.).&lt;/li&gt;
&lt;li&gt;Contain only presentation logic (show/hide, format dates, mapping arrays to lists).&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  ViewModels:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Own the screen state i.e. isLoading, error, selectedUser, etc.&lt;/li&gt;
&lt;li&gt;Wrap all business logic + async operations like loadUsers, saveUser, deleteUser.&lt;/li&gt;
&lt;li&gt;Transform raw models into a shape that’s easy for the View.
e.g. from [{ firstName, lastName }] ➜ [{ fullName, initials }].&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MVVM brings along with it a concept called 2-way binding. As the name suggests, it helps the data bind both ways. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When the ViewModel changes → the View updates automatically.&lt;br&gt;
When the user changes something in the View → the ViewModel updates automatically.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is not something that we'd directly get out-of-the-box in a library like React, but it can be implemented in this fashion:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; ViewModel exposes value + setter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from "react";

export function useProfileViewModel() {
  const [name, setName] = useState("");

  function updateName(newName: string) {
    setName(newName); // updates ViewModel state (Model -&amp;gt; View)
  }

  return {
    name,
    updateName,
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In MVVM:&lt;br&gt;
name is the ViewModel state watched by the View.&lt;br&gt;
updateName is the command that changes the state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; The View binds the UI element to the ViewModel&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export function ProfilePage() {
  const { name, updateName } = useProfileViewModel();

  return (
    &amp;lt;input
      value={name}                                  // ViewModel → View
      onChange={(e) =&amp;gt; updateName(e.target.value)}  // View → ViewModel
    /&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Multiple Views can share a single View Model but the vice-versa doesn't apply.&lt;br&gt;
A single View &lt;strong&gt;cannot&lt;/strong&gt; bring its data from multiple View Models!&lt;/p&gt;

&lt;p&gt;In the early frontend architectures like the MVC days&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI elements were manipulated directly&lt;/li&gt;
&lt;li&gt;Data was not bindable&lt;/li&gt;
&lt;li&gt;There was no place to store UI state (like loading, error, filters, selected item)&lt;/li&gt;
&lt;li&gt;The View was responsible for everything — DOM operations, formatting, logic, even data fetching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This meant the front-end was:&lt;br&gt;
❌ Not reactive&lt;br&gt;
❌ Hard to test&lt;br&gt;
❌ Hard to scale&lt;br&gt;
❌ Very brittle&lt;/p&gt;

&lt;p&gt;There was no unified idea of “&lt;em&gt;&lt;strong&gt;the UI is a function of state.&lt;/strong&gt;&lt;/em&gt;”&lt;/p&gt;

&lt;p&gt;MVVM is one of the first architectural patterns that formally brought the concept of state into frontend development.&lt;/p&gt;

&lt;p&gt;Let's discuss some pros and cons:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pros&lt;/th&gt;
&lt;th&gt;Cons&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Clear layer separation between UI, Business and presentation logic&lt;/td&gt;
&lt;td&gt;With higher modularisation of the application, the learning curve is a bit steeper&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The higher decoupling makes it easier to scale and test&lt;/td&gt;
&lt;td&gt;MVVM doesn't give you a place to organise all the other application concerns like API requests / data fetching logic, Caching, Authentication logic&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;A small enhancement on top of the MMVM architecture is the introduction of the &lt;em&gt;Coordinator&lt;/em&gt; into the architecture: effectively making it &lt;strong&gt;MMVM-C&lt;/strong&gt;. The job of the coordinator is to separate screen transitions and navigations out of the View layer, thus decoupling the View even further.&lt;br&gt;
And similar to this, came another enhancement, &lt;strong&gt;&lt;a href="https://medium.com/@pinarkocak/understanding-viper-pattern-619fa9a0b1f1" rel="noopener noreferrer"&gt;VIPER&lt;/a&gt;&lt;/strong&gt;, where the business logic is even more isolated from the rest of the components and solved the issue of &lt;em&gt;"fat ViewModels"&lt;/em&gt;. This is mostly developed to be used in mobile applications, but can also be used for web apps.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While MVVM wasn’t the final stop in architectural evolution, it paved the way for more expressive patterns and a deeper understanding of how applications should be structured as they scale.&lt;/p&gt;

&lt;p&gt;The story continues...&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>architecture</category>
      <category>mvvm</category>
    </item>
    <item>
      <title>A story on Frontend Architectures - MVC, the MVP</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Mon, 01 Dec 2025 18:45:11 +0000</pubDate>
      <link>https://dev.to/purnez/a-story-on-frontend-architectures-mvc-the-mvp-2hpd</link>
      <guid>https://dev.to/purnez/a-story-on-frontend-architectures-mvc-the-mvp-2hpd</guid>
      <description>&lt;p&gt;The evolution of frontend engineering goes back to the time when the World Wide Web(WWW) was a flashy thing and just like today's(most possibly!) AI bubble, there was the dot-com bubble.&lt;/p&gt;

&lt;p&gt;Websites at that time weren’t filled with animations, 3D rendering, colourful dynamic fonts, or immersive interactions like we see today. They were as &lt;em&gt;static as a magazine&lt;/em&gt;, consisting of plain HTML and CSS, with very less interactivity from just a little sprinkle of JavaScript.&lt;/p&gt;

&lt;p&gt;HTML wasn’t designed for applications; it was built to serve documents, much like PDFs. Everything was rendered on the server, and nothing interesting happened on the client.&lt;/p&gt;

&lt;p&gt;Mind it, they were super fast… but also super boring for human eyes!&lt;/p&gt;

&lt;p&gt;With increasing internet popularity, the need of sophisticated websites also grew. People wanted to be shown greetings when they login, their shopping cart when they purchase, know the weather etc. and static HTML couldn't do this.&lt;/p&gt;

&lt;p&gt;So the web needed server-side logic where pages were no longer stored but are generated on the go, birthing the real software development era.&lt;/p&gt;

&lt;p&gt;But again, there was no predefined rule on how dynamic pages are to be created and how the code needs to be structured.&lt;/p&gt;

&lt;p&gt;Dynamic pages were rendered 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;const http = require("http");

http.createServer((req, res) =&amp;gt; {
  const name = "John";
  const products = ["Pen", "Notebook", "Bag"];

  let html = `
  &amp;lt;html&amp;gt;
    &amp;lt;body&amp;gt;
      Hello ${name}
      &amp;lt;ul&amp;gt;
        ${products.map(p =&amp;gt; `&amp;lt;li&amp;gt;${p}&amp;lt;/li&amp;gt;`).join("")}
      &amp;lt;/ul&amp;gt;
    &amp;lt;/body&amp;gt;
  &amp;lt;/html&amp;gt;
  `;

  res.setHeader("Content-Type", "text/html");
  res.end(html);
}).listen(3000);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What we see above is called "&lt;em&gt;&lt;strong&gt;spaghetti code&lt;/strong&gt;&lt;/em&gt;", where the logic + HTML + SQL + loops + conditions is all mixed in one file.&lt;/p&gt;

&lt;p&gt;And with the explosion of the WWW and the incoming of the several online applications and businesses requiring user sessions, validations, access control, complex business logic, a structure was desperately needed.&lt;/p&gt;

&lt;p&gt;A good architecture in systems is essential for 3 important things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility&lt;/strong&gt; of changing parts of the application when no longer needed and to stay updated with new frameworks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testability&lt;/strong&gt; of the application, boiling down to its individual layers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt; of the application's individual parts as well as the whole of it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This was also the time when popular object oriented backend programming languages(Java, C#, Python) were coming up and what better time than then to enforce a standard that would leave a mark on the world of software engineering!&lt;/p&gt;

&lt;h1&gt;
  
  
  Enter MVC
&lt;/h1&gt;

&lt;p&gt;To address the problems above, comes the standard of MVC - Model, View &amp;amp; Controller architecture.&lt;br&gt;
MVC solves 3 main pain points:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Separates the mixing of HTML and backend logic&lt;/li&gt;
&lt;li&gt;Database queries are grouped together rather than being scattered&lt;/li&gt;
&lt;li&gt;The whole engineering team has now a well-defined structure:

&lt;ul&gt;
&lt;li&gt;Database Engineers for the Model&lt;/li&gt;
&lt;li&gt;Designers for the View&lt;/li&gt;
&lt;li&gt;Backend Engineers for the Controller&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's understand what the MVC architecture model a little bit in depth and how the data-flow works. Refer to the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwni3wpk27xl7hapwjn3s.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%2Fwni3wpk27xl7hapwjn3s.png" alt="data flow in MVC" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Suppose I have an application in a MVC structure to which the user sends a request:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The request goes to the router which sees the kind of request made by the user&lt;/li&gt;
&lt;li&gt;Router forwards the request to the controller for the particular route&lt;/li&gt;
&lt;li&gt;Controller sees the need to call the Model which has the power to manipulate the database according to the particular request&lt;/li&gt;
&lt;li&gt;The Model then talks to(queries) the database&lt;/li&gt;
&lt;li&gt;The database results are sent back to the Model&lt;/li&gt;
&lt;li&gt;Model sends the data back to the controller&lt;/li&gt;
&lt;li&gt;Controller sends the data to the View to be parsed in a HTML template&lt;/li&gt;
&lt;li&gt;The server sends the rendered HTML back to the user.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And this is how the data-flow works inside the MVC architecture.&lt;/p&gt;

&lt;p&gt;Let's break down the above "&lt;em&gt;spaghetti code&lt;/em&gt;" into a clean MVC model!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; models/
    products.js
  controllers/
    homepage.js
  views/
    home.ejs
  app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Model (models/products.js)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exports.getProducts = () =&amp;gt; {
  return ["Pen", "Notebook", "Bag"];
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Controller (controllers/homepage.js)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const ProductModel = require("../models/products");

exports.homePage = (req, res) =&amp;gt; {
  const name = "John";
  const products = ProductModel.getProducts();

  res.render("home", { name, products });
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  View (views/home.ejs)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
  &amp;lt;body&amp;gt;
    Hello &amp;lt;%= name %&amp;gt;
    &amp;lt;ul&amp;gt;
      &amp;lt;% products.forEach(p =&amp;gt; { %&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;%= p %&amp;gt;&amp;lt;/li&amp;gt;
      &amp;lt;% }) %&amp;gt;
    &amp;lt;/ul&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Entry point (app.js)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require("express");
const app = express();
const homeController = require("./controllers/homepage");

app.set("view engine", "ejs");

app.get("/", homeController.homePage);

app.listen(3000);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above, we broke the code into modular parts separating concerns into different folders, with proper semantic conventions of MVC architecture, thus making it easy to debug, maintain and scale.&lt;/p&gt;

&lt;p&gt;MVC marked the web’s shift from scattered, unstructured scripts to clean, maintainable, production-ready applications.&lt;br&gt;
It laid the foundation for all modern frameworks, including the frontends we build today.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>mvc</category>
    </item>
    <item>
      <title>Polyfills - a filler or a gaping hole? (Part-2)</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Thu, 29 Aug 2024 20:29:39 +0000</pubDate>
      <link>https://dev.to/purnez/polyfills-a-filler-or-a-gaping-hole-part-2-14b3</link>
      <guid>https://dev.to/purnez/polyfills-a-filler-or-a-gaping-hole-part-2-14b3</guid>
      <description>&lt;p&gt;We'd discussed some very interesting topics like transpilers and polyfills in the last blog and came across a popular transpiler, Babel and how its polyfill package was deprecated and the use of required alternatives.&lt;/p&gt;

&lt;p&gt;Moving on from here, our main focus will be on polyfills and a very special and popular (or now, unpopular) service, Polyfill.io&lt;br&gt;
This name has been around quite a lot now, and if you've not been living under a rock, you'd be knowing of the kind of security issues that it brought with itself, almost affecting 300k+ sites (4% of the web) across the internet.&lt;/p&gt;

&lt;p&gt;Let me walk you again through some history, which might give some perspective on how things transpired:&lt;br&gt;
There are a lot of open-source libraries out there providing polyfill supports, among which &lt;em&gt;polyfill.js&lt;/em&gt; is a popular one. It used the service &lt;strong&gt;Polyfill.io&lt;/strong&gt;, developed by the Financial Times, to serve polyfills based on the user's browser.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Things started to get fishy way back in June 2023 -  when Google gave a security warning to its advertisers regarding a possibility of users getting redirected to malicious websites if they click on their ads, which might be using these libraries
&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%2Fw0x722zmd2mmopnz48bw.png" alt="Google's letter to advertisers" width="665" height="845"&gt;
&lt;/li&gt;
&lt;li&gt;Cut to February 2024, we hear from the creator of the polyfill service project, who &lt;a href="https://x.com/triblondon/status/1761852117579427975" rel="noopener noreferrer"&gt;raised concerns&lt;/a&gt; about the project and its new ownership.
Now later that time, we come to know that &lt;strong&gt;Funnull&lt;/strong&gt;, a CDN service provider in China has acquired the Polyfill.io domain and its GitHub account.
Cloudflare, a CDN and cybersecurity service provider, also came up with its own &lt;a href="https://blog.cloudflare.com/polyfill-io-now-available-on-cdnjs-reduce-your-supply-chain-risk/" rel="noopener noreferrer"&gt;alternative solution&lt;/a&gt; to what might be a future problem, due to concerns in the community relating to Polyfill.io. &lt;/li&gt;
&lt;li&gt;Come June 2024, we hear everywhere across the internet to check if your website uses 
&lt;strong&gt;&lt;em&gt;cdn.polyfill.io&lt;/em&gt;&lt;/strong&gt; and to get it removed ASAP!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What happened suddenly? Is it time to say goodbye to old browsers and forget about polyfills? Are we really witnessing another worldwide cybercrime?&lt;/p&gt;

&lt;p&gt;Let's dive into some sweet details. &lt;/p&gt;

&lt;p&gt;You read earlier that Funnull, a CDN service provider acquired the polyfill domain. What does a CDN do?&lt;br&gt;
&lt;em&gt;CDN stands for Content Delivery Network. Now imagine, if you'd a server very far somewhere and you need to provide service to users all around the world. Different users may get different experience while loading your site, the fastest being the happiest and the slowest might not even wait for it to load. CDN comes in handy here, where it keeps a copy of the main server's content, spread across the globe, so it can be retrieved anytime.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Funnull would've taken over the polyfill.io domain with the promise of a better experience to its users with its widespread network of CDNs. But something happened during the handover of the GitHub account.&lt;br&gt;
Polyfill.io, being one of the top domains for polyfill usage, used Cloudflare's services, like CDN, scalability, security, DNS management etc. You must be knowing, to use any service on your platform you need an API key. This key, unique to every app, tells the service that it needs to use its data for its purpose.&lt;br&gt;
And logically, this key needs to be protected from the public to prevent any kind of unauthorized access or abuse of the service.&lt;/p&gt;

&lt;p&gt;But what if your website is taken over, like in the case of Polyfill.io? Do the new owners get control of the keys?&lt;/p&gt;

&lt;p&gt;Well, there are certain practices like :&lt;br&gt;
&lt;strong&gt;1) Rotating API keys&lt;/strong&gt; - generate new API keys in regular intervals&lt;br&gt;
&lt;strong&gt;2) Limit Key access&lt;/strong&gt; - ensuring you restrict access on what services can be granted access&lt;br&gt;
&lt;strong&gt;3) Using secure channels&lt;/strong&gt; - any kind of transfer should happen over a secure, encrypted channel&lt;/p&gt;

&lt;p&gt;Here, the owners did a blunder during the transition, by accidentally uploading an .env file(used to store secrets) to the public repository&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fooipkhjbxjeg6g8tmtfq.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%2Fooipkhjbxjeg6g8tmtfq.png" alt="Secrets leaked" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, this leak gave access to the Cloudflare account and in turn, they managed to change its DNS(Domain Name System) records. Think of DNS records as an internet's address book of different websites/domains, which contain important information about the websites.&lt;/p&gt;

&lt;p&gt;One such record is called &lt;a href="https://www.cloudflare.com/learning/dns/dns-records/dns-cname-record/" rel="noopener noreferrer"&gt;CNAME&lt;/a&gt;. For &lt;code&gt;cdn.polyfill.io&lt;/code&gt;, the CNAME record was changed to a malicious domain by the attackers to &lt;code&gt;cdn.polyfill.io.bsclink.cn&lt;/code&gt;, a China-based CDN domain hosted by Baishan Cloud. Thus, going on to inject malicious JS code through it, details of which are very clearly pointed out &lt;a href="https://sansec.io/research/polyfill-supply-chain-attack" rel="noopener noreferrer"&gt;here&lt;/a&gt; by Sansec Research, one of the very first ones to write publicly about the incident.&lt;/p&gt;

&lt;p&gt;Along with &lt;code&gt;polyfill.io&lt;/code&gt;, several other domains associated with the same Cloudflare account were also flagged under malicious ownership like :&lt;br&gt;
&lt;code&gt;bootcdn.net&lt;/code&gt;, &lt;code&gt;bootcss.com&lt;/code&gt;, &lt;code&gt;staticfile.net&lt;/code&gt;, &lt;code&gt;staticfile.org&lt;/code&gt;, &lt;code&gt;unionadjs.com&lt;/code&gt;, &lt;code&gt;xhsbpza.com&lt;/code&gt;, &lt;code&gt;union.macoms.la&lt;/code&gt;, &lt;code&gt;newcrbpc.com&lt;/code&gt;. And the same action is recommended: stop using them!&lt;/p&gt;

&lt;p&gt;Later, the domain was taken down and easy alternative to &lt;a href="https://blog.cloudflare.com/automatically-replacing-polyfill-io-links-with-cloudflares-mirror-for-a-safer-internet/" rel="noopener noreferrer"&gt;mirror the polyfill functionality&lt;/a&gt; was provided by Cloudflare.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Phew, that was some information!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Who is responsible for all this? The owner who sold it? The projects who used it? The warnings that were ignored?&lt;/p&gt;

&lt;p&gt;Well, when matters are of cybersecurity, there's never a single entity involved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; Consider this &lt;a href="https://x.com/malwrhunterteam/status/1806031794183008765?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1806031794183008765%7Ctwgr%5E5a317b9cacc36f34559def6cee001e5b2f686bc8%7Ctwcon%5Es1_&amp;amp;ref_url=https%3A%2F%2Fsocket.dev%2Fblog%2Fnamecheap-takes-down-polyfill-io-service-following-supply-chain-attack" rel="noopener noreferrer"&gt;tweet&lt;/a&gt;, which shows proofs of the sale. If you'd seen the tweet of the founder earlier on top, he denies any influence over the sale.&lt;br&gt;
Well, who do we blame here? Maintaining an open source project requires a lot of efforts from the community and the maintainers. There are several layers to the governance. And projects which are so widely used, like polyfill.io, need to be updated at all times. This requires time out of your daily schedule and contributing for a better developer experience around the world. And only a few do really know the ins and outs of a project.&lt;br&gt;
Funding is a big part of an open-source project, without which it's very difficult to carry on day-to-day tasks for maintainers.&lt;br&gt;
Here's a &lt;a href="https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md" rel="noopener noreferrer"&gt;heart-wrenching example&lt;/a&gt; of the core-js library we'd talked about in the 1st part. I recommend everyone to go through this once and understand the efforts and create maintainer relationships.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; As mentioned, projects that got affected used the &lt;code&gt;cdn.polyfill.io&lt;/code&gt; in the src of a script tag. Using an &lt;a href="https://www.w3schools.com/Tags/att_script_integrity.asp" rel="noopener noreferrer"&gt;integrity&lt;/a&gt; attribute in a script tag ensures that the content of the external script hasn't been tampered with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; Importance of educating users and application owners about the risks and best practices of security, authentication, access control and regular auditing. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Open-source software is built on collaboration and trust. By respecting the sanctity of its ecosystem, we ensure that it remains a vibrant and secure environment for developers and users alike.&lt;/p&gt;

&lt;p&gt;Links to some insightful articles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.bleepingcomputer.com/news/security/polyfillio-bootcdn-bootcss-staticfile-attack-traced-to-1-operator/" rel="noopener noreferrer"&gt;https://www.bleepingcomputer.com/news/security/polyfillio-bootcdn-bootcss-staticfile-attack-traced-to-1-operator/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://socket.dev/blog/namecheap-takes-down-polyfill-io-service-following-supply-chain-attack" rel="noopener noreferrer"&gt;https://socket.dev/blog/namecheap-takes-down-polyfill-io-service-following-supply-chain-attack&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Polyfills - a filler or a gaping hole? (Part-1)</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Mon, 26 Aug 2024 17:36:47 +0000</pubDate>
      <link>https://dev.to/purnez/polyfills-a-filler-or-a-gaping-hole-l3h</link>
      <guid>https://dev.to/purnez/polyfills-a-filler-or-a-gaping-hole-l3h</guid>
      <description>&lt;p&gt;A few days back, we received a priority message in our organization's Teams chat, which read: &lt;strong&gt;Security Vulnerability found - Polyfill JavaScript detected - HIGH&lt;/strong&gt;.&lt;br&gt;
To give a context, I work for a major banking firm and as you must know, banking and security vulnerabilities are like major foes. So, we started to dig deep into the matter and got it resolved in a few hours, which I'll discuss in the following. But the good (or worst?) part is when I googled about the issue initially, the search results that popped up kept me hooked for the rest of the day!&lt;/p&gt;

&lt;p&gt;Let's highlight a discrepancy between a modern and a legacy browser. Here’s a &lt;a href="https://caniuse.com/#compare=ie+9,chrome+62&amp;amp;compare_cats=HTML5,JS,JS%20API" rel="noopener noreferrer"&gt;comparison&lt;/a&gt; of the latest Chrome release versus Internet Explorer (IE) 9. Modern browsers support a whole lot of ES6 features and at the same time, IE9 and also IE11, which are still used by a lot of companies barely support any ES6 features. &lt;br&gt;
Here comes to help the concept of &lt;strong&gt;&lt;em&gt;transpiling&lt;/em&gt;&lt;/strong&gt;, which in the context of JavaScript, refers to converting source code written in modern JavaScript (ES6/ES2015 and beyond) into an older version like ES5, which is widely supported by older browsers. A very popular transpiler is &lt;strong&gt;Babel&lt;/strong&gt;, which offers a range of features like syntax transformation, code bundling (along with Webpack) and support for JSX (for our sweet friend, React!).&lt;/p&gt;

&lt;p&gt;Now, use of transpilers is very common at places where there is a lot of modern syntax, and one has to ensure the compatibility across different environments. Do note that converting an entire codebase into a different version requires a heck lot of time and also setting up a build process and additional configuration for things like Babel. It goes untold that, along with converting syntactical features, API functionality to extend the same feature replication in old browser is also covered.&lt;/p&gt;

&lt;p&gt;Coming to the reference of Babel, it constitutes a lot of packages, providing plugins for different kinds of functionalities like transforming ES6 classes, arrow functions, etc. into equivalent JS code. Among this, it also offers its own "polyfill" package.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Polyfills&lt;/em&gt;&lt;/strong&gt; are pieces of code which enable old browsers to provide the same/almost same JS functionality, which they don't natively provide, that is shown in newer browser versions.  Here's a &lt;a href="https://youtu.be/saewjAZlwlg?si=Ln_QBqH1XlXqONkQ" rel="noopener noreferrer"&gt;quick video example&lt;/a&gt; and &lt;a href="https://www.youtube.com/watch?v=kJZFEI67HoM" rel="noopener noreferrer"&gt;very simple implementation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now one might think, then what's the difference between transpilers and polyfills? Well, polyfills focus on emulating specific APIs which are missing rather than changing the entire codebase into an old-browser-friendly version done by transpilers. This allows for a more granular approach and of course, making it more efficient and performant.&lt;/p&gt;

&lt;p&gt;This should give us enough background to get to the point to why I got hooked for a day till the very moment I'm writing this, about polyfills.&lt;/p&gt;

&lt;p&gt;Now, Babel has a package called &lt;strong&gt;babel/polyfill&lt;/strong&gt; which constitutes of 2 libraries: core-js and regenerator-runtime. Initially, importing this package would bring in all the polyfills into action.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import '@babel/polyfill';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But bringing in everything whether your project would use them or not, increased the bundle size and injecting polyfills globally might lead to conflicts in objects.&lt;br&gt;
This led to deprecating the package and Babel recommends using the core-js library directly by &lt;br&gt;
&lt;strong&gt;Step 1&lt;/strong&gt;: Modifying the babel configuration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "presets": [
    ["@babel/preset-env", {
      "useBuiltIns": "usage",
      "corejs": 3
    }]
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Manually import the polyfills that you'd use in your project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "core-js/es/array/includes";
import "core-js/es/promise";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;thus, saving memory and reducing unnecessary code.&lt;/p&gt;

&lt;p&gt;Now, this is the end of one part, not so concerning per se, but definitely important in regard of a project, staying up to date with the changes in dependencies, serving their customers a better experience.&lt;/p&gt;

&lt;p&gt;BUT. This is not all.&lt;/p&gt;

&lt;p&gt;We're about to discuss a major attack which took place recently and shook up the entire internet and got them scouring their codebase. &lt;br&gt;
And, it includes the thing which we've discussed over here. So stay tuned for the second part!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>polyfill</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>A First Timer's Journey at KubeCon</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Sun, 24 Oct 2021 21:24:26 +0000</pubDate>
      <link>https://dev.to/purnez/a-first-timers-journey-at-kubecon-126o</link>
      <guid>https://dev.to/purnez/a-first-timers-journey-at-kubecon-126o</guid>
      <description>&lt;p&gt;Let's have some context: &lt;strong&gt;KubeCon+CloudNativeCon&lt;/strong&gt; is one of the biggest conferences in the world where users, developers and companies who have/want to adopt the Cloud Native standard of running applications and use Kubernetes in their organizations, gather and discuss new ideas, learn deeper insights about it, make connections and have fun. Lots of amazing talks, events, meetups, parties, competitions happen in a span of 5 days, which can make a newbie fall in love with this awesome community.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh9qp0xofgtyep62pelop.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%2Fh9qp0xofgtyep62pelop.png" alt="KubeCon NA 2021" width="800" height="534"&gt;&lt;/a&gt;&lt;br&gt;
This year KubeCon was held both virtually and in-person at North America and it was fun to browse through the spaces from my laptop and get live updates from in-person attendees through Twitter. So, I thought to pen down my takeaways of the keynotes and learnings of some events I attended which I felt can be interesting and helpful for someone new to the community. Since this is gonna be a bit elaborate, I'll group them day-wise and event wise for better navigation.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;center&gt;Prologue&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;I came to know about this event since July while going through the Kubernetes website and was very excited for the upcoming one. This time there was a scholarship for students, which gave access to a lot of paid events for free, so many students were joining for the first time. As days went by, both the noise of the event and my excitement(being virtual was still a bummer) grew exponentially!&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;center&gt;DAY-1&lt;/center&gt;
&lt;/h2&gt;

&lt;p&gt;The CNCF has a great initiative of connecting people over a video chat called &lt;strong&gt;Mix-and-Mingle&lt;/strong&gt;. Folks were talking about a lot of different topics; on Kubernetes, some exciting talks, career paths; the whole day. Fun-fact: at one point of time we were talking about genetics and evolution, so if you're ever attending this event, don't forget to drop-by and say a Hi! &lt;br&gt;
Also, this happened:&lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1448712007318839297-608" src="https://platform.twitter.com/embed/Tweet.html?id=1448712007318839297"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1448712007318839297-608');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1448712007318839297&amp;amp;theme=dark"
  }



&lt;br&gt;
The first two days were reserved for co-located events(Events on a specific domain of work such as ServiceMesh Con, Security Con, Data on Kubernetes day etc.), which are more of industry oriented and not something I was interested in. &lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;center&gt;DAY-2&lt;/center&gt;
&lt;/h2&gt;
&lt;h4&gt;
  
  
  # College to Cloud Native: A Student's Introduction to KubeCon + CloudNativeCon
&lt;/h4&gt;

&lt;p&gt;It started with a great introduction to the cloud native space and CNCF for college students by Bill Mulligan(&lt;a href="https://twitter.com/breakawaybilly" rel="noopener noreferrer"&gt;@breakawaybilly&lt;/a&gt;) and Savitha Raghunathan(&lt;a href="https://twitter.com/coffeeartgirl" rel="noopener noreferrer"&gt;@coffeeartgirl&lt;/a&gt;). They discussed how someone completely new to the ecosystem and learn on the go and contribute parallelly. Since there was a platform of different things for the virtual event access, they went through the website to clarify doubts regarding accessibility and discussed job opportunities at big companies and startups, exciting upcoming sessions, mentoring sessions and also how can one get started with Kubernetes. Starting out can be a real problem for newbies and Savitha described her own experience on how she got to meet amazing folks, know about the community and gain a lot of knowledge by contributing to small things and gradually moving up. Bonus point: if you want to have a healthy and fast growth in the community and writing excites you, look out for SIG-Docs. It's one of the easiest things to do and also a preferred starting place for many, as it's plane English and if technology interests you, you can just write about it and improve the official documentation. This helps a great deal to new contributors and also existing ones to understand the subject matter.&lt;/p&gt;
&lt;h4&gt;
  
  
  # Data on Kubernetes Day
&lt;/h4&gt;

&lt;p&gt;Next was a co-located event, "DoK Day" by the &lt;a href="https://dok.community/" rel="noopener noreferrer"&gt;Data on Kubernetes Community&lt;/a&gt;, of which I'm a proud member😁. It started with a brief introduction by the community interns, featured some of the best practices by experts of running data on Kubernetes, technical challenges faced, use cases, learnings and finally ending with some good quiz, which can get you some cool swags. Shoutout to the very cool Bart Farrell(&lt;a href="https://twitter.com/birthmarkbart" rel="noopener noreferrer"&gt;@birthmarkbart&lt;/a&gt;) to organize this flawlessly! Anyone wanting to join us, here's the slack, you're most welcome! - &lt;a href="//dokcommunity.slack.com"&gt;dokcommunity.slack.com&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;center&gt;DAY-3&lt;/center&gt;
&lt;/h2&gt;

&lt;p&gt;Finally it's time for the main event. Keynotes, sessions, one-on-one mentoring events and much more!&lt;/p&gt;
&lt;h4&gt;
  
  
  # Building your Brand with CNCF
&lt;/h4&gt;

&lt;p&gt;Bill Mulligan(&lt;a href="https://twitter.com/breakawaybilly" rel="noopener noreferrer"&gt;@breakawaybilly&lt;/a&gt;) and Charley Mann(&lt;a href="https://twitter.com/Charley_Mann" rel="noopener noreferrer"&gt;@Charley_Mann&lt;/a&gt;) discussed how students and end users can leverage CNCF opportunities to build their own brand. There are various tiers of membership you can opt for, which gets you social and marketing benefits and also as a student, you can submit your blogs, create your own community to be a CNCF ambassador. Adding to that, there are many certifications by the CNCF and The Linux Foundation, which are recognized industry-wide and can help propel your career in Cloud Native and Kubernetes.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;KEYNOTE 1&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The GM of CNCF, Priyanka Sharma(&lt;a href="https://twitter.com/pritianka" rel="noopener noreferrer"&gt;@pritianka&lt;/a&gt;) kicked it off with some great announcements like new sponsors, big increase in community members in less than 6 months &amp;amp; announcement of a new certificate "&lt;strong&gt;Kubernetes and Cloud Native associate&lt;/strong&gt;" for beginners to the space. Security was the hottest topic of discussion this year and OpenSSF(&lt;a href="https://twitter.com/theopenssf" rel="noopener noreferrer"&gt;@theopenssf&lt;/a&gt;) was introduced for the safeguarding and long term benefit of open source software. 
Diversity and Inclusion holds a major spot in the open source community and the indigenous culture was presented with a song to set the mood. &lt;/li&gt;
&lt;li&gt;The concept of multicluster, its architecture and the need to do so were discussed by Kaslin Fields(&lt;a href="https://twitter.com/kaslinfields" rel="noopener noreferrer"&gt;@kaslinfields&lt;/a&gt;) with her very own artwork. Join SIG-Multicluster and SIG-Networking for more info.&lt;/li&gt;
&lt;li&gt;Lots of cloud native projects moved from sandbox to incubation stage and some to graduation(levels of acceptance of a project). Here's the &lt;a href="https://landscape.cncf.io/" rel="noopener noreferrer"&gt;CNCF landscape&lt;/a&gt; for reference. &lt;/li&gt;
&lt;li&gt;Finally, Cornelia Davis(&lt;a href="https://twitter.com/cdavisafc" rel="noopener noreferrer"&gt;@cdavisafc&lt;/a&gt;) explained how projects move through the levels of maturity and made a big announcement. For first timers, there is a concept of &lt;a href="https://github.com/kubernetes/community/blob/master/sig-list.md#special-interest-groups" rel="noopener noreferrer"&gt;SIG&lt;/a&gt; which are now called &lt;strong&gt;TAG&lt;/strong&gt;(Technical Advisory Groups). These TAGs cover different areas of the landscape.
&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%2F8iua1inirbf6ekz0cvfi.png" alt="TAGs" width="800" height="358"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  # Why is Anyone using Kubernetes Anyway?
&lt;/h4&gt;

&lt;p&gt;This session sounded a lot relatable as this is an obvious question from someone new into this community "Why do I need to learn it anyway?". The folks from SIG-Usability(Tasha Drew(&lt;a href="https://twitter.com/TashaDrew" rel="noopener noreferrer"&gt;@TashaDrew&lt;/a&gt;), Josephene Pynadath, Gaby Moreno Cesar(&lt;a href="https://twitter.com/morengab" rel="noopener noreferrer"&gt;@morengab&lt;/a&gt;) &amp;amp; Carl J Pearson(&lt;a href="https://twitter.com/carljpearson" rel="noopener noreferrer"&gt;@carljpearson&lt;/a&gt;) perform extensive market research, 1-on-1 interviews with developers, end-users and make sure their perspectives and workflows are addressed. They make recommendations on how and where to store documentations, practice videos, tutorials for anyone to get started and also for experienced folks to get access to important info. &lt;br&gt;
To address the elephant in the room, people are pulled into this "Kubernetes" mostly because of the hype and everyone wants to try it. But they stay due to the awesome community it provides and high-end infrastructure design that makes life easier for developers. This can be a roadblock as not everyone likes to know how the backend is designed. And also the upgrades and frequent updates can be challenging to adopt with by an organization. They also share tips on how to contribute and be a part of the team.&lt;/p&gt;
&lt;h4&gt;
  
  
  # Putting into Practice the Skills you've learned while contributing to Kubernetes
&lt;/h4&gt;

&lt;p&gt;Towards the end of the day, there was a good session on applying the skills learnt while contributing to Kubernetes by Kiran Oliver(&lt;a href="https://twitter.com/kiran_oliver" rel="noopener noreferrer"&gt;@kiran_oliver&lt;/a&gt;). &lt;br&gt;
He discussed on how to involve yourself in meetings, attending and organizing meetups and putting yourself out there and create content in your own voice. He focused on sharing your expertise, unify, teach and inspire others. There are a lot of problems which one might have faced while trying to contribute to the project. And there's always a chance this can happen to others. So, helping them goes a long way to strengthen the community and learn things at a good pace. Progress, as much as we want it to be, isn't linear, quoting him "this isn't a traditional Zelda dungeon, it's a breath in the wild". These are important points to take note of while going through your path of being a contributor.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here, I'd also like to give a shoutout to the session, which happened in parallel, on &lt;strong&gt;"Kubernetes SIG-Docs: A Deep Dive".&lt;/strong&gt; SIG-Docs have been the starting place for many experienced and new contributors and is a must-watch to know how things revolve and operate around there.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;center&gt;DAY-4&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;KEYNOTE 2&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The very cool, Stephen Augustus(&lt;a href="https://twitter.com/stephenaugustus" rel="noopener noreferrer"&gt;@stephenaugustus&lt;/a&gt;), kicked the day off by giving project updates. The Code of Conduct committee released a transparency report which makes community members feel psychologically safe. SIG Security, one of the newer SIGs, is doing some great work, providing hardening guides and cross-platform work, as Security was the main topic of discussion. The release of newer versions(done by SIG-Release) now has a proper roadmap. Persistent storage is now a priority and SIG-Storage needs new folks to work on that(shoutout to Data on Kubernetes Community). Inclusivity being a big factor in Open Source, led to a Inclusive Naming Initiative group. Focus was given on hiring technical writers for SIG Docs.&lt;/li&gt;
&lt;li&gt;Next up, Vaibhav Kamra(CTO of &lt;a href="https://twitter.com/kastenhq" rel="noopener noreferrer"&gt;@kastenhq&lt;/a&gt;) discussed the surge of attendees of KubeCon over the years and also unveiled a new open source project, kubestr.io and also provides free training for it.&lt;/li&gt;
&lt;li&gt;Katelin Ramer(&lt;a href="https://twitter.com/wussowk" rel="noopener noreferrer"&gt;@wussowk&lt;/a&gt;) and Kim McMahon(&lt;a href="https://twitter.com/kamcmahon" rel="noopener noreferrer"&gt;@kamcmahon&lt;/a&gt;) talked about CNCF and RISC-V(&lt;a href="https://twitter.com/risc_v" rel="noopener noreferrer"&gt;@risc_v&lt;/a&gt;), leading the open-hardware environment. They talked about how better solutions can be come up by building together and good alliances.&lt;/li&gt;
&lt;li&gt;The CNCF community has grown to a very big community and Constance Caramanolis(&lt;a href="https://twitter.com/ccaramanolis" rel="noopener noreferrer"&gt;@ccaramanolis&lt;/a&gt;) discussed about the future, the underlying projects, user burden, challenges faced by companies and means to sustain them. Not something surprising, more than 90% of folks know about Kubernetes first instead of any other project.&lt;/li&gt;
&lt;li&gt;Jasmine James(&lt;a href="https://twitter.com/gojasmineee" rel="noopener noreferrer"&gt;@gojasmineee&lt;/a&gt;) talked about creating holistic Developer Experience creating 4 human centered pillars- &lt;em&gt;Discoverability, Usability, Capability and Stability&lt;/em&gt;, to address developer challenges.&lt;/li&gt;
&lt;li&gt;On an ending note, Lachlan Evenson(&lt;a href="https://twitter.com/LachlanEvenson" rel="noopener noreferrer"&gt;@LachlanEvenson&lt;/a&gt;) told us about networking(pretty hard stuff xD) and Robert Duffy discussed how the Expedia Group is leveraging the Cloud Native landscape.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  # A Vulnerable Tale about Burnout
&lt;/h4&gt;

&lt;p&gt;Mental health has always been a priority in this fast moving world and the issue of burnout is quite frequent among professionals, but often neglected. We always talk about max productivity at workplace and everywhere and working hard to reach "the dream place". Yet, a big part of our lives stays unnoticed and the consequences are severe. Julia Simon(&lt;a href="https://twitter.com/JuliaSimon14" rel="noopener noreferrer"&gt;@JuliaSimon14&lt;/a&gt;) shared her very own story "A Vulnerable Tale about Burnout" of being in depression and suffering a complete burnout, the factors leading to those, some mistakes she made on the way and how she recovered from that to take control of her own life and curated a list of everyday events to be happy on her own. She also shared some small steps that one can take to be productive and stay happy in life.&lt;/p&gt;
&lt;h4&gt;
  
  
  # Panel Discussion: Cloud Native Computing Foundation Mentees
&lt;/h4&gt;

&lt;p&gt;Great panel discussion on Open Source mentorship(LFX Mentorship) and getting started in Open Source in general by Kunal Kushwaha (&lt;a href="https://twitter.com/kunalstwt" rel="noopener noreferrer"&gt;@kunalstwt&lt;/a&gt;), Divya Mohan(&lt;a href="https://twitter.com/Divya_Mohan02" rel="noopener noreferrer"&gt;@Divya_Mohan02&lt;/a&gt;), Uchechukwu Obasi (&lt;a href="https://twitter.com/Thisisobate" rel="noopener noreferrer"&gt;@Thisisobate&lt;/a&gt;) &amp;amp; Developer Advocate of CNCF, Ihor Dvoretskyi (&lt;a href="https://twitter.com/idvoretskyi" rel="noopener noreferrer"&gt;@idvoretskyi&lt;/a&gt;). &lt;br&gt;
Here's a thread I compiled about the learnings, which can be very helpful to get a bird's eye view of the entire session: &lt;iframe class="tweet-embed" id="tweet-1448735994736373767-172" src="https://platform.twitter.com/embed/Tweet.html?id=1448735994736373767"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1448735994736373767-172');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1448735994736373767&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h4&gt;
  
  
  # Getting Involved in the K8s Release Shadow Program
&lt;/h4&gt;

&lt;p&gt;Divya Mohan(&lt;a href="https://twitter.com/Divya_Mohan02" rel="noopener noreferrer"&gt;@Divya_Mohan02&lt;/a&gt;) discussed about the Kubernetes release shadow program and how one can apply to be a shadow. &lt;br&gt;
The release committee is designed as: &lt;br&gt;
Emeritus adviser -&amp;gt; Different release teams(enhancements, docs, comms etc.) -&amp;gt; Their shadows.&lt;br&gt;
It is NOT an internship and surely not the only way to knowing about Kubernetes. It is basically an apprenticeship model, helping with coordinating and facilitating of tasks. Through this process, one can gain knowledge on release process of a new version in an open source project and its importance to the stakeholders. Apart from that, you can also learn in depth about what various SIGs are working on. The time commitment is of 3-4 months. As Divya says, "the time you put into something is what you get out of it". &lt;br&gt;
Anyone can apply for this and no prior knowledge or experience of release process or coding expertise is needed. Though some prior involvement can be very beneficial. It's an extremely competitive process with 100+ applications(increasing every release cycle) for about 20 odd seats, but can be a big boost to your resume.&lt;/p&gt;

&lt;h4&gt;
  
  
  # Beyond Block Diagrams: Different Ways of Understanding K8s Architecture
&lt;/h4&gt;

&lt;p&gt;Learning about the vast infrastructure behind the design of Kubernetes can be challenging in a world where things are automated development is prioritized nowadays and that's what Kim Schlesinger(&lt;a href="https://twitter.com/kimschles" rel="noopener noreferrer"&gt;@kimschles&lt;/a&gt;) terms as Cloud native generation: writes software and deploys it into cloud and discussed along. It's difficult for them to know how architectural design happens in the backend. She shared 3 methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mental model/Mental representation 
Create diagrams that show the sequential process of things with passage of time. Although this is vastly used, there are chances that people just try to mug up rather than getting a real feel of what's happening.&lt;/li&gt;
&lt;li&gt;Distributed tracing technology as a learning tool
Method used to profile and monitor applications built using microservice architecture. She explained the process with a demo example application executing the sequential processes.
&lt;/li&gt;
&lt;li&gt;Build 3D models of clusters. Here's something cool that she built on her own to "feel" the Kubernetes design:-
&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%2Ffpkn8wqow0x99qrvclgp.png" alt="3D model" width="800" height="606"&gt; 
This kind of interactive learning can be very effective to learn and memorize.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;center&gt;DAY-5&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;The day started off with a candid chat "AMA Coffee Klatch" of lot of folks with Priyanka Sharma(&lt;a href="https://twitter.com/pritianka" rel="noopener noreferrer"&gt;@pritianka&lt;/a&gt;) over a Zoom call. It was a fun session where you could ask about anything that happens in and around CNCF and how you can be involved with answers straight out of the mouth of the General Manager herself. A must-attend in every KubeCon!&lt;/p&gt;

&lt;p&gt;Time for the final KubeCon keynote and the day, a bit sad that it's ending but the past few days had been nothing but awesome.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;KEYNOTE 3&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The keynote kicked off with Machine Learning on Kubernetes by Jimmy Guerrero(&lt;a href="https://twitter.com/_jimmyguerrero" rel="noopener noreferrer"&gt;@_jimmyguerrero&lt;/a&gt;) and Masoud Mirmomeni. They talked about skills shortage for getting projects into production, challenges faced by ML especially and how &lt;a href="https://twitter.com/kubeflow" rel="noopener noreferrer"&gt;Kubeflow&lt;/a&gt; helps in solving them.&lt;/li&gt;
&lt;li&gt;The theme of Security was continued by Luke Hinds(&lt;a href="https://twitter.com/decodebytes" rel="noopener noreferrer"&gt;@decodebytes&lt;/a&gt;) speaking about sigstore(&lt;a href="https://twitter.com/projectsigstore" rel="noopener noreferrer"&gt;@projectsigstore&lt;/a&gt;). He emphasized on how critical services are built on open source software.&lt;/li&gt;
&lt;li&gt;Paris Pittman(&lt;a href="https://twitter.com/ParisInBmore" rel="noopener noreferrer"&gt;@ParisInBmore&lt;/a&gt;) and Christoph Blecker(&lt;a href="https://twitter.com/tophee" rel="noopener noreferrer"&gt;@tophee&lt;/a&gt;) talked about sustaining the community, key to open source success with focus on SIG-Contributor Experience. The community has grown from 8k to 66k contributors and still a lot is left to do and learn. Documented roles help the community sustain and grow past ourselves. Companies are called out to sponsor their employees contributing to Open Source and Kubernetes to have a production ready project. There is always a need for new contributors and the community welcomes them.&lt;/li&gt;
&lt;li&gt;Stephen Augustus(&lt;a href="https://twitter.com/stephenaugustus" rel="noopener noreferrer"&gt;@stephenaugustus&lt;/a&gt;) shared some useful messages on prioritizing health, burnouts, taking a step back and scaling yourself on the contributor ladder. In his words "If you're the only person in the world that can do the thing, you're wrong. Go record the demo or write the blog".&lt;/li&gt;
&lt;li&gt;SBOM(Software Bill of Materials) is a new concept around here and was discussed by Allan Friedman(&lt;a href="https://twitter.com/allanfriedman" rel="noopener noreferrer"&gt;@allanfriedman&lt;/a&gt;). It's basically a list of ingredients that constitutes your code and you can also get started by creating them.&lt;/li&gt;
&lt;li&gt;Then came the best part of the keynote, Award ceremony! The best contributors and maintainers are recognized on the grand stage. Here is the &lt;a href="https://www.cncf.io/announcements/2021/10/15/cloud-native-computing-foundation-announces-2021-community-awards-winners/" rel="noopener noreferrer"&gt;list of winners&lt;/a&gt;. 
With this the KubeCon NA 2021 keynote came to a end, but....with the announcement of the next KubeCon in &lt;strong&gt;Valencia, Spain&lt;/strong&gt;!!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  # SIG Contributor Experience Deep Dive- Alison Dowdney(&lt;a href="https://twitter.com/alisondowdney" rel="noopener noreferrer"&gt;@alisondowdney&lt;/a&gt;), Bob Killen(&lt;a href="https://twitter.com/MrBobbyTables" rel="noopener noreferrer"&gt;@MrBobbyTables&lt;/a&gt;) &amp;amp; Christoph Blecker(&lt;a href="https://twitter.com/tophee" rel="noopener noreferrer"&gt;@tophee&lt;/a&gt;)
&lt;/h4&gt;

&lt;p&gt;One of the few SIGs where folks can start out and also people in leadership position to know about new tools, policies and procedures in which things work around in the Kubernetes community. The teams are divided into multiple domains like Events, Marketing, managing GitHub, YouTube, Zoom and Community activities.&lt;br&gt;
Some subprojects under them are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contributor site (&lt;a href="//k8s.dev"&gt;k8s.dev&lt;/a&gt;): publishes contributor guide, community Calendar which has list of all meetings happening and scheduled over the week and in the future and Release information. &lt;/li&gt;
&lt;li&gt;Community Repo(&lt;a href="https://github.com/kubernetes/community" rel="noopener noreferrer"&gt;kubernetes/community&lt;/a&gt;): contains governance documentation, election procedures etc.&lt;/li&gt;
&lt;li&gt;Contributor Comms: Contributor twitter (&lt;a href="https://twitter.com/K8sContributors" rel="noopener noreferrer"&gt;@K8sContributors&lt;/a&gt;) handles latest developments, new features and contributing opportunities, which are also managed by a automated twitter bot.&lt;/li&gt;
&lt;li&gt;Manage the membership roles for folks to go up the &lt;a href="https://github.com/kubernetes/community/blob/master/community-membership.md" rel="noopener noreferrer"&gt;contributor ladder&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Mentoring for new contributors through Group mentoring cohorts, Shadow programs, Google Summer of Code, Contributor workshop etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How can &lt;strong&gt;you&lt;/strong&gt; contribute:&lt;br&gt;
-&amp;gt; Subscribe to Contrib-Ex Mailing list&lt;br&gt;
-&amp;gt; Attend SIG meetings regularly to stay in context of what's &lt;br&gt;
   happening&lt;br&gt;
-&amp;gt; Find a buddy&lt;br&gt;
-&amp;gt; Volunteer to take notes during the meeting&lt;br&gt;
-&amp;gt; Small contribution &lt;strong&gt;&amp;gt;&lt;/strong&gt; Volunteering for the world&lt;br&gt;
-&amp;gt; Look out for Good First Issues as they boost your confidence&lt;br&gt;
-&amp;gt; Not only code, but also marketing&lt;/p&gt;

&lt;h4&gt;
  
  
  # Peer Group Mentoring &amp;amp; Career Networking
&lt;/h4&gt;

&lt;p&gt;This was a fun &amp;amp; intuitive session of interacting with fellow learners and some expert contributors. We were paired up randomly and sent into different breakout rooms, where there was a specific mentor and you could ask questions, interact and network. One of my most best conversations happened here when the technical sales lead of a Kubernetes provider company was our mentor for some 15 minutes. I came to know about the approximate cost of creating your own Kubernetes service and why companies prefer using services of other providers and not create their own. He also asked about me and how I was doing in my career.&lt;br&gt;
Since this is a 1-on-1 conversation, this is a great opportunity for students to increase their networking and knowledge.&lt;/p&gt;

&lt;h4&gt;
  
  
  # Homebrewing a Kubernetes Bootcamp: From College to K8s Support Engineer
&lt;/h4&gt;

&lt;p&gt;Being a fresh college student or a recent graduate, learning something vast as Kubernetes can be a very overwhelming. Alice Wasko(&lt;a href="https://twitter.com/alisondowdney" rel="noopener noreferrer"&gt;@AliceWasko&lt;/a&gt;) took us through her experience as a fresh hire from college needing to learn it for the company and how she set up her own bootcamp and tips for anyone to set up one for themselves.&lt;br&gt;
1) Some previous basic knowledge can help, but it's never too late to learn.&lt;br&gt;
2) List out what you want to learn first(some basic container mechanism with Docker and basic Kubernetes terms like Pods, Deployments &amp;amp; Service can be a good starting point)&lt;br&gt;
3) Structure your learning plan/Figure out the why of stuff like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deployments create Pods&lt;/li&gt;
&lt;li&gt;Pods run containers&lt;/li&gt;
&lt;li&gt;Services help in distributing traffic&lt;/li&gt;
&lt;li&gt;How traffic get to where it needs to&lt;/li&gt;
&lt;li&gt;What kind of service to service communication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4) Try some hands-on with a small piece of code or build a small app and test it out by changing stuff. This can help you set the base to learn more advanced topics&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Try building a Hello world app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;5) Go in depth of the basic things you learned earlier such as architectural designs and networking in detail.&lt;br&gt;
6) Learning resources like Documentations, Blogs and Videos are great to refer. But always have flexibility as not everyone learn in the same way.&lt;br&gt;
7) Organize learning materials in the order of beginner to expert understanding.&lt;br&gt;
8) Get feedback from people and try to work on it together to improve the content. In her words "It's a never ending project".&lt;br&gt;
Finally, always know that planning out such a roadmap has the potential to make you a pro in the subject as well as smoothen the learning journey.&lt;/p&gt;




&lt;p&gt;With this, my first KubeCon came to an end. I got to know a lot about what happens in the community and met some new people online who were both fun to talk and share ideas. Since there were about 5 to 6 meetings in every time slot, it wasn't possible to attend each one. There were also other fun games happening throughout these 5 days like BugBash, BattleSnake KubeCon Cup, whose winners were awarded at the end. The SIG deep-dives are really helpful for anyone needing to find a domain in which they feel a bit comfortable to work on. And also, a big thanks to the team of &lt;a href="https://www.twitch.tv/cloudnativefdn" rel="noopener noreferrer"&gt;cloudnative.tv&lt;/a&gt; whose daily wrap-up gave a brief, insightful overview of all the events that happened everyday.&lt;br&gt;&lt;br&gt;
I definitely carry a lot of knowledge and to-do activities with me to move forward and hope any new contributor reading this would go and watch the recording of the above-mentioned sessions(if haven't) to have a nice headstart to begin their own journey! &lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cloudnative</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Data Resiliency</title>
      <dc:creator>Purneswar Prasad</dc:creator>
      <pubDate>Wed, 06 Oct 2021 13:33:00 +0000</pubDate>
      <link>https://dev.to/purnez/data-resiliency-2pe8</link>
      <guid>https://dev.to/purnez/data-resiliency-2pe8</guid>
      <description>&lt;p&gt;Before knowing what the keyword(Resiliency) means, let's understand what led to this concept.&lt;/p&gt;

&lt;p&gt;Consider the example of a fiber optic connection between 2 buildings. Just to have a backup, there is always a second/replica connection in case of a failure. This is called &lt;em&gt;Redundancy&lt;/em&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrzzlt8unxz6tl3xxy4z.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%2Fjrzzlt8unxz6tl3xxy4z.png" alt="Redundant connections" width="800" height="190"&gt;&lt;/a&gt;&lt;br&gt;
But there's a problem with this arrangement. If there are any external factors like construction, pests etc., both the wires can be exposed at the very same time, thus resulting in complete failure of connection if they're destroyed.&lt;br&gt;
Thus, the inception of the term &lt;em&gt;Resiliency&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Resiliency is the capacity to recover quickly from difficulties, self-heal the system and converge back to the original state.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The exact same connection can be laid out in a way where the backup wire can be laid, connecting different locations of the 2 buildings. So, if one of them is exposed, the other stays completely safe!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnw9sszgrl2zbw8ik58q0.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%2Fnw9sszgrl2zbw8ik58q0.png" alt="Resilient connections" width="800" height="284"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h5&gt;
  
  
  Let's learn its significance in the cloud &amp;amp; cloud-native space:
&lt;/h5&gt;

&lt;p&gt;While talking about systems and resiliency in cloud, there are certain terminologies which come into action. Some of these are availability, reliability, durability and of course, resiliency. They are used to measure how a certain request by the user is handled by the server and determine the metrics. &lt;a href="https://sprinkle-twinkles.medium.com/availability-vs-reliability-vs-durability-vs-resiliency-dfead8c92c58" rel="noopener noreferrer"&gt;This&lt;/a&gt; is a nice blogpost explaining these terms in detail. &lt;/p&gt;

&lt;p&gt;The cloud native space have opened a new domain of engineers assigned for this role called as Site Reliability Engineers(SREs). Every company, big or small, prioritizes their customers and should be available for every small request. So, SREs follow certain contracts with the clients to maintain a certain percentage of uptime(the time their server stays active and running). They achieve this by having a high availability percentage(in the ranges of &lt;strong&gt;99.9%&lt;/strong&gt;). Even they are measured using metrices like SLA, SLO and SLI. &lt;a href="https://www.ibm.com/cloud/blog/using-cloud-native-and-sre-principles-to-achieve-speed-and-resiliency" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is a blog explaining the basics of cloud native and SREs in detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resiliency in cloud look something like this:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvpz9blhdiw1xdzq6ppi.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%2Fnvpz9blhdiw1xdzq6ppi.png" alt="Distributed systems" width="512" height="312"&gt;&lt;/a&gt;&lt;br&gt;
Here, when a request is started by the user, there is a &lt;a href="https://www.f5.com/services/resources/glossary/load-balancer" rel="noopener noreferrer"&gt;load balancer&lt;/a&gt; which distributes the request to several back-end servers, which try to fulfill the request. If one of the system goes down, others can help complete the request, thus making it a resilient system.&lt;/p&gt;

&lt;h4&gt;
  
  
  But construction and rats aren't the problem in cloud computing, then why do we need Resiliency??
&lt;/h4&gt;

&lt;p&gt;Because downtimes(opposite of uptime) are the biggest evil in production. There have been multiple instances in the past when big MNCs have lost millions in revenue due to poorly managed systems. With the advent of cloud-native technologies and microservice architecture, although automation and ease of production has been reaching its peak, the danger of failure keeps on increasing. Recently, on the October 4, 2021, Facebook had a server outage of almost 12 hours which costed them $6 bn!! &lt;a href="https://engineering.fb.com/2021/10/05/networking-traffic/outage-details/" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is an article by the engineering team explaining that.&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%2Fsd1fk4408hlrer05hvd3.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%2Fsd1fk4408hlrer05hvd3.png" alt="Chaos Engg" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
Due to this, in 2010 Netflix developed a practice called Chaos Engineering, when it ran into a similar problem, to make systems more fault-tolerant.&lt;br&gt;
&lt;em&gt;Chaos Engineering is a disciplined approach to identifying failures before they become outages. By proactively testing how a system responds under stress, you can identify and fix failures before they end up in the news.&lt;/em&gt; &lt;br&gt;
This was adopted by the Cloud Native Computing Foundation(CNCF) later to develop different projects like LitmusChaos, ChaosMesh etc. Simply speaking, this is the practice of "breaking things on purpose" just to make systems more resilient to failures.&lt;/p&gt;

&lt;h4&gt;
  
  
  How Kubernetes achieves it?
&lt;/h4&gt;

&lt;p&gt;Just to give a small intro to &lt;a href="https://kubernetes.io/" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt;(k8s), it is a tool which helps you deploy your applications, scale and manage them as per your wish. To learn in detail, how k8s is resilient in itself, we need to dive deep into the various components constituting it. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is how Kubernetes looks from the inside:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcmeiyuq3u6yainjfrxj.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%2Fqcmeiyuq3u6yainjfrxj.png" alt="k8s diagram" width="800" height="385"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I know this is a lot to digest to be thrown at the face suddenly, so, let's just try to understand it in a layman's perspective.&lt;/p&gt;

&lt;p&gt;Imagine a lizard. We know that when a lizard's tail gets cut off, it doesn't die but the tail grows back. But if you take its heart out, it dies instantly(so does every being on this planet).&lt;br&gt;
K8s has a similar structure. There is a control plane and multiple worker nodes. Control plane is the most important component as it contains the heart, the API server(along with a few other things). Any kind of applications, if deployed, are run on the worker nodes. This command is relayed to the different components by the API server only. So, all the different components watch commands of the API server. If due to some error, one of the worker node goes down, the nodes watching the API server sees that the application which needs to run isn't running and thus, with some internal mechanism, deploys the application to a different worker node. And by that time, it creates another worker node to replace the destroyed one(lizard analogy!). Thus, the downtimes are at an all time low!&lt;/p&gt;

&lt;p&gt;These features make Kubernetes one of the biggest technical innovations in the recent times and an industry revolutionizer with more and more companies adopting the various cloud native technologies and scaling up their production with such container orchestration tools. &lt;br&gt;
As a wise man previously said, "Learning Kubernetes isn't a technical challenge, it's a people's challenge".&lt;/p&gt;

&lt;p&gt;I hope if you've reached here till the end of this blog, I've kept you interested enough to learn more about cloud native, containers and Kubernetes. &lt;/p&gt;

&lt;p&gt;Here are a few &lt;strong&gt;resources&lt;/strong&gt; to go through and start your journey in this space:&lt;br&gt;
1) &lt;a href="https://www.youtube.com/watch?v=I0p8MIezKkE" rel="noopener noreferrer"&gt;A short intro to Cloud vs Cloud Native&lt;/a&gt;&lt;br&gt;
2) &lt;a href="https://youtube.com/playlist?list=PLy7NrYWoggjzfAHlUusx2wuDwfCrmJYcs" rel="noopener noreferrer"&gt;Learn Docker&lt;/a&gt;&lt;br&gt;
3) &lt;a href="https://youtube.com/playlist?list=PLy7NrYWoggjziYQIDorlXjTvvwweTYoNC" rel="noopener noreferrer"&gt;Start with Kubernetes&lt;/a&gt;&lt;br&gt;
4) Most important, join the &lt;a href="https://slack.k8s.io" rel="noopener noreferrer"&gt;Kubernetes slack&lt;/a&gt; and be a part of an amazing community of people.  &lt;/p&gt;

</description>
      <category>cloudnative</category>
      <category>kubernetes</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
