<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Swetha Nethmi on Medium]]></title>
        <description><![CDATA[Stories by Swetha Nethmi on Medium]]></description>
        <link>https://medium.com/@swethane28?source=rss-739dcc30e951------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jPSZMjmny87hZ8AL</url>
            <title>Stories by Swetha Nethmi on Medium</title>
            <link>https://medium.com/@swethane28?source=rss-739dcc30e951------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:00:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@swethane28/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Blazor in .NET: Building Modern Web Apps Without JavaScript]]></title>
            <link>https://medium.com/@swethane28/blazor-in-net-building-modern-web-apps-without-javascript-00bab3253cc5?source=rss-739dcc30e951------2</link>
            <guid isPermaLink="false">https://medium.com/p/00bab3253cc5</guid>
            <category><![CDATA[blazor]]></category>
            <category><![CDATA[blazor-webassembly]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Swetha Nethmi]]></dc:creator>
            <pubDate>Thu, 23 Apr 2026 17:25:45 GMT</pubDate>
            <atom:updated>2026-04-23T17:25:45.417Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How Microsoft’s full-stack framework is changing the way .NET developers approach the web</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6PmFMQLawhAKKzeqT_Khqw.png" /></figure><p>For years, .NET developers faced an uncomfortable split: write business logic in C# on the backend, then context-switch into JavaScript (or TypeScript) to handle the frontend. The toolchains were different, the mental models diverged, and the build pipelines often felt like two separate projects glued together.</p><p>Blazor changes that. Introduced by Microsoft as part of the ASP.NET Core ecosystem, Blazor lets you build interactive web UIs entirely in C# — the same language you already use for your APIs, models, and services. No JavaScript required (though you can still call it when you need to).</p><p>Let’s take a proper look at what Blazor is, how it works, and why it matters for .NET developers in 2025.</p><h3>What Is Blazor?</h3><p>Blazor is a web framework for building interactive client-side UIs using C# and .NET instead of JavaScript. It uses a component-based model — similar in spirit to React or Angular — where you build reusable UI pieces called <em>Razor components</em> (.razor files) that combine HTML markup with C# logic.</p><p>Here’s a simple counter component to give you the feel:</p><pre>@page &quot;/counter&quot;</pre><pre>&lt;h1&gt;Counter&lt;/h1&gt;<br>&lt;p&gt;Current count: @currentCount&lt;/p&gt;<br>&lt;button @onclick=&quot;IncrementCount&quot;&gt;Click me&lt;/button&gt;</pre><pre>@code {<br>    private int currentCount = 0;</pre><pre>    private void IncrementCount()<br>    {<br>        currentCount++;<br>    }<br>}</pre><p>That’s it. No JavaScript event handlers. No document.getElementById. Just C# handling the click, and Blazor taking care of updating the DOM.</p><h3>Blazor Hosting Models: Server vs WebAssembly vs Auto</h3><p>One of the most important things to understand about Blazor is that it isn’t a single runtime — it comes in distinct hosting models, each with different trade-offs.</p><h3>Blazor Server</h3><p>In Blazor Server, your components run on the server inside an ASP.NET Core process. UI updates are sent to the browser over a real-time SignalR connection. The browser stays thin; the server does the heavy lifting.</p><p><strong>Pros:</strong> Fast initial load, full access to server resources, small download size.<br> <strong>Cons:</strong> Requires a persistent connection, latency for every interaction, doesn’t work offline.</p><p>This model is ideal for internal enterprise applications where you control the network environment and need tight integration with databases or services.</p><h3>Blazor WebAssembly (WASM)</h3><p>Here, the .NET runtime itself is compiled to WebAssembly and runs <em>inside the browser</em>. Your C# code executes client-side, with no server round-trips needed for UI interactions.</p><p><strong>Pros:</strong> True offline capability, no server dependency after load, scales easily.<br> <strong>Cons:</strong> Larger initial download, slower startup (though AOT compilation has improved this significantly in .NET 8 and 9).</p><p>This is the model that made developers do a double-take — running real .NET inside a browser tab feels almost like a magic trick the first time you see it.</p><h3>Blazor Auto (Introduced in .NET 8)</h3><p>The newest hosting model takes a pragmatic approach: start with Blazor Server for fast initial interactivity, then transparently switch to WebAssembly once the WASM runtime has downloaded in the background. You get the best of both worlds — fast startup <em>and</em> offline-capable execution — without writing different code for each.</p><h3>The .NET 8 and 9 Era: Render Modes Are Everything</h3><p>With .NET 8, Microsoft introduced a unified <em>full-stack web UI</em> model. A single Blazor app can now mix rendering strategies per component:</p><ul><li><strong>Static Server-Side Rendering (SSR):</strong> Pure HTML, no interactivity overhead — perfect for content-heavy pages.</li><li><strong>Interactive Server:</strong> Adds real-time interactivity via SignalR for specific components.</li><li><strong>Interactive WebAssembly:</strong> Runs specific components in the browser.</li><li><strong>Interactive Auto:</strong> Starts as Server, upgrades to WASM.</li></ul><p>You annotate components with render mode attributes:</p><pre>@rendermode InteractiveServer</pre><p>or globally in your router configuration. This granular control means you’re no longer forced to choose a single strategy for your entire app — a product listing page can be static SSR while a shopping cart component runs interactively.</p><h3>Why Blazor Makes Sense for .NET Teams</h3><p>The productivity argument is real. When your entire stack shares one language, one type system, and one set of models, things get simpler in a meaningful way:</p><p><strong>Shared models:</strong> Define your Product or UserProfile class once in a shared project, and use it in both your API and your UI components. No serialization drift, no duplicated TypeScript interfaces.</p><p><strong>One build pipeline:</strong> A single dotnet build and dotnet publish covers everything. CI/CD pipelines become dramatically simpler.</p><p><strong>Familiar tooling:</strong> Visual Studio, VS Code with the C# Dev Kit, and JetBrains Rider all have strong Blazor support. Debugging C# components feels natural if you’re already a .NET developer.</p><p><strong>Access to the .NET ecosystem:</strong> Need encryption, serialization, logging, or dependency injection? You’re already in .NET — just use it. Microsoft.Extensions.DependencyInjection works the same in Blazor components as anywhere else in ASP.NET Core.</p><h3>Calling JavaScript When You Need To</h3><p>Blazor doesn’t pretend JavaScript doesn’t exist. For cases where you genuinely need to call browser APIs or integrate third-party JS libraries, IJSRuntime provides a clean interop bridge:</p><pre>@inject IJSRuntime JS</pre><pre>private async Task ShowAlert()<br>{<br>    await JS.InvokeVoidAsync(&quot;alert&quot;, &quot;Hello from C#!&quot;);<br>}</pre><p>You can call JavaScript from C# and invoke C# methods from JavaScript. Interop is a first-class citizen, not an afterthought.</p><h3>When to Choose Blazor (and When Not To)</h3><p>Blazor is a compelling choice when:</p><ul><li>Your team is primarily C# / .NET developers</li><li>You’re building internal tools, dashboards, or LOB (line-of-business) applications</li><li>You want full-stack type safety without a JavaScript frontend framework</li><li>You’re already using ASP.NET Core APIs and want UI in the same codebase</li></ul><p>It’s worth pausing when:</p><ul><li>Your project has heavy SEO requirements (though SSR helps significantly here)</li><li>You need a large ecosystem of battle-tested UI component libraries (though options like MudBlazor and Radzen have matured considerably)</li><li>Your team has deep React or Vue expertise and the migration cost outweighs the benefit</li></ul><h3>The Bigger Picture</h3><p>Blazor is part of a broader Microsoft bet on WebAssembly as a serious runtime for production workloads. With .NET’s WASM capabilities maturing AOT compilation, multi-threading support, and WASI integration on the roadmap — the performance gap with JavaScript frameworks continues to close.</p><p>For .NET developers, Blazor represents something genuinely valuable: the ability to own the full stack without fundamentally changing how you think or what tools you use. Whether you pick Server for a quick internal dashboard or go full WebAssembly for an offline-capable app, you’re writing C# the whole way down.</p><p>If you haven’t given Blazor a serious look since the early days, .NET 8 and 9 are a good reason to revisit. The rough edges have been sanded down, the performance story is compelling, and the unified full-stack model finally delivers on the original promise.</p><p>The web doesn’t have to mean JavaScript anymore, at least not if you’re a .NET developer.</p><p><em>Thanks for reading!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00bab3253cc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>