<?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 Sachin Ghadi on Medium]]></title>
        <description><![CDATA[Stories by Sachin Ghadi on Medium]]></description>
        <link>https://medium.com/@sachinghadi?source=rss-82b0e1a6d159------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Sachin Ghadi on Medium</title>
            <link>https://medium.com/@sachinghadi?source=rss-82b0e1a6d159------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:35:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sachinghadi/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[ .NET 11 is here! A big step forward for developers.]]></title>
            <link>https://medium.com/@sachinghadi/net-11-is-here-a-big-step-forward-for-developers-fb5dbd8caa1d?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb5dbd8caa1d</guid>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[dotnet-maui]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 08:51:07 GMT</pubDate>
            <atom:updated>2026-11-11T08:51:07.620Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*80MEIOPerBNv6yyFeXWbRg.png" /></figure><p>The .NET ecosystem is getting smarter, faster, and more powerful!</p><p>.NET 11 brings exciting improvements across C#, <a href="http://asp.net/">ASP.NET</a> Core, Entity Framework Core, Runtime, Libraries, SDK, Windows Forms, and .NET MAUI.</p><p>Let’s understand what’s new in simple language. 👇</p><h3>1️⃣ C# 15 — Write cleaner and smarter code</h3><ul><li>Union types to represent multiple possible outcomes.</li><li>Better switch checks to catch missing cases.</li><li>Extension indexers for more flexible access to data.</li><li>Improved collection expressions.</li><li>Better control over nested loops.</li></ul><p>In simple words: Write more reliable code and let the compiler catch mistakes before your application runs.</p><h3>2️⃣ ASP.NET Core — Better API development</h3><ul><li>Async validation for Minimal APIs.</li><li>OpenAPI 3.2 support by default.</li><li>Built-in OpenTelemetry tracing.</li><li>Better cancellation support for SignalR.</li><li>New [ShortCircuit] attribute.</li></ul><p>In simple words: Build APIs with better validation, monitoring, and performance.</p><h3>3️⃣ Entity Framework Core — Smarter database queries</h3><ul><li>FullJoin support.</li><li>MinByAsync and MaxByAsync.</li><li>Better support for complex-type indexes.</li><li>Improved SQL generation.</li><li>JSON path existence checks.</li></ul><p>In simple words: Work with databases more efficiently and write better queries with less effort.</p><h3>4️⃣ Runtime — More performance</h3><ul><li>Runtime-native async support.</li><li>Improved JIT compiler.</li><li>Faster NativeAOT interface dispatch.</li><li>Better crash reporting.</li><li>Hardware FP16 support on compatible CPUs.</li></ul><p>In simple words: Faster applications, improved debugging, and better performance.</p><h3>5️⃣ Libraries — More built-in features</h3><ul><li>Better JSON support for C# and F# union types.</li><li>JSON Lines support.</li><li>Zstandard compression.</li><li>Easier process execution and output capture.</li><li>OpenTelemetry metrics for MemoryCache.</li></ul><p>In simple words: More useful features are available directly in the .NET libraries, reducing the need for extra packages.</p><h3>6️⃣ .NET SDK — Better developer experience</h3><ul><li>Smaller Linux and macOS installers.</li><li>NativeAOT support for CLI applications.</li><li>More control over dotnet test.</li><li>Multi-architecture container builds with Podman.</li><li>MSBuild server enabled by default.</li></ul><p>In simple words: Faster builds, easier testing, and a smoother development workflow.</p><h3>7️⃣ Windows Forms — Modern desktop applications</h3><ul><li>Modern visual styles.</li><li>New toggle switches.</li><li>SuspendPainting API.</li><li>Built-in kiosk mode.</li><li>Deferred form display.</li></ul><p>In simple words: Build modern-looking Windows desktop applications with smoother UI updates.</p><h3>8️⃣ .NET MAUI — Better cross-platform development</h3><ul><li>CoreCLR as the default runtime.</li><li>Opt-in NativeAOT publishing.</li><li>On-device testing templates.</li><li>Themed splash screens.</li><li>iOS notification permission support.</li></ul><p>In simple words: Build and test mobile applications more easily across platforms.</p><h3>💡 My Takeaway</h3><p>.NET 11 is not just about adding new features. It focuses on making everyday development easier.</p><p>Whether you are building APIs, working with databases, developing desktop applications, or creating mobile apps, there are improvements worth exploring.</p><p>The biggest highlights for me are:</p><p>✅ Better C# language features ✅ Improved application performance ✅ Smarter database operations ✅ Built-in observability ✅ Better testing and developer tools</p><p>The future of .NET development looks exciting!</p><p>Which .NET 11 feature are you most excited to try?</p><p>Share your thoughts in the comments! 👇</p><p>#dotnet11 #dotnet #csharp #aspnetcore #EntityFrameworkCore #dotnetdeveloper #SoftwareDevelopment #Microsoft #Programming #DeveloperCommunity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb5dbd8caa1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[⚡        …]]></title>
            <link>https://medium.com/@sachinghadi/-05fc79165a7f?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/05fc79165a7f</guid>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[token]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 15:36:20 GMT</pubDate>
            <atom:updated>2026-11-07T15:36:20.749Z</atom:updated>
            <content:encoded><![CDATA[<h3>⚡ 𝗪𝗵𝗮𝘁 𝗵𝗮𝗽𝗽𝗲𝗻𝘀 𝘄𝗵𝗲𝗻 𝗮 𝗰𝗹𝗶𝗲𝗻𝘁 𝗱𝗶𝘀𝗰𝗼𝗻𝗻𝗲𝗰𝘁𝘀 𝘄𝗵𝗶𝗹𝗲 𝘆𝗼𝘂𝗿 𝗔𝗦𝗣.𝗡𝗘𝗧 𝗖𝗼𝗿𝗲 𝗔𝗣𝗜 𝗶𝘀 𝘀𝘁𝗶𝗹𝗹 𝗽𝗿𝗼𝗰𝗲𝘀𝘀𝗶𝗻𝗴?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pfQjOLKZqjK21EHxWUhORQ.png" /></figure><p>Your API might continue executing database queries, making HTTP calls, and consuming resources unnecessarily.</p><p>That’s where 𝗖𝗮𝗻𝗰𝗲𝗹𝗹𝗮𝘁𝗶𝗼𝗻𝗧𝗼𝗸𝗲𝗻 𝗰omes in.</p><p>In ASP.NET Core Minimal APIs, it is automatically bound to `HttpContext.RequestAborted`.</p><p>Just pass it to your asynchronous operations, and they can stop when the client cancels the request.</p><p>A small implementation detail that can make your APIs more efficient and resource-friendly!</p><p>💡 𝗥𝗲𝗺𝗲𝗺𝗯𝗲𝗿: Cancellation is cooperative. Your operations must support and respect the token.</p><p>Do you use `CancellationToken` consistently in your ASP.NET Core projects?</p><p>#DotNet #ASPNETCore #CSharp #WebAPI #BackendDevelopment #SoftwareEngineering #CleanCode</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05fc79165a7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Backend Design Patterns Every Developer Should Know Before 2027]]></title>
            <link>https://medium.com/@sachinghadi/10-backend-design-patterns-every-developer-should-know-before-2027-6cfdaaf1e929?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cfdaaf1e929</guid>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[software-design-patterns]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 08:28:57 GMT</pubDate>
            <atom:updated>2026-10-27T08:28:57.564Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--wsJ4edhRp1b2lBAF4sJg.png" /></figure><p><em>Build cleaner APIs, reduce code complexity, and design backend systems that are easier to test, scale, and maintain.</em></p><p>Modern backend development is about much more than creating APIs and connecting databases. As applications grow, developers must deal with changing business requirements, external services, increasing traffic, and complex workflows.</p><p>A simple application might start with a few controllers, some database queries, and a handful of service classes. But as new features arrive, the code can become tightly coupled. A small change may affect several unrelated modules, testing becomes harder, and debugging production issues takes longer.</p><p>The solution isn’t necessarily to introduce more code or adopt a complicated architecture. It’s to structure the code intelligently.</p><p>Design patterns are reusable approaches to common software design problems. They help developers decide where responsibilities belong, how components communicate, and how new functionality can be introduced without creating unnecessary dependencies.</p><p>In this guide, we’ll explore ten useful backend design patterns, with examples relevant to C#, <a href="http://asp.net/">ASP.NET</a> Core, APIs, databases, and distributed systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7kWErwKphLtCLe_1ujUYg.png" /></figure><h3>1. Repository Pattern — Separate Data Access from Business Logic</h3><p>Imagine an <a href="http://asp.net/">ASP.NET</a> Core controller that directly executes Entity Framework Core queries, validates business rules, calculates prices, and prepares HTTP responses.</p><p>Initially, this might seem convenient. However, as the application grows, the controller becomes responsible for too many things.</p><p>The Repository Pattern introduces a dedicated component for accessing and querying data. Application services can request the data they need without embedding database-specific operations throughout the application.</p><p>Example:</p><pre>public interface IProductRepository<br>{<br>    Task&lt;Product?&gt; GetByIdAsync(<br>        int id,<br>        CancellationToken cancellationToken);<br>}</pre><pre>public sealed class ProductRepository : IProductRepository<br>{<br>    private readonly AppDbContext _db;</pre><pre>    public ProductRepository(AppDbContext db)<br>    {<br>        _db = db;<br>    }</pre><pre>    public Task&lt;Product?&gt; GetByIdAsync(<br>        int id,<br>        CancellationToken cancellationToken)<br>    {<br>        return _db.Products<br>            .FirstOrDefaultAsync(<br>                p =&gt; p.Id == id,<br>                cancellationToken);<br>    }<br>}</pre><p>A service can depend on IProductRepository rather than directly constructing database access logic.</p><p>Why use it?</p><ul><li>Keeps persistence concerns separate from business logic.</li><li>Creates a clear boundary around data access.</li><li>Can simplify testing when the abstraction provides useful isolation.</li><li>Makes database operations easier to organize.</li></ul><p>Important: Entity Framework Core’s DbContext already provides repository-like and unit-of-work behavior. A custom repository isn&#39;t automatically necessary for every application; use one when it adds meaningful value.</p><h3>2. Factory Pattern — Centralize Object Creation</h3><p>What happens when your application supports multiple payment providers?</p><p>Today, you might use Stripe. Tomorrow, the business may introduce Razorpay or PayPal.</p><p>If every service creates payment implementations directly, adding a new provider can spread conditional logic throughout the codebase.</p><p>The Factory Pattern centralizes the decision about which implementation to create or select.</p><p>Example:</p><pre>public interface IPaymentProcessor<br>{<br>    Task ProcessAsync(<br>        decimal amount,<br>        CancellationToken cancellationToken);<br>}</pre><pre>public sealed class CardPaymentProcessor<br>    : IPaymentProcessor<br>{<br>    public Task ProcessAsync(<br>        decimal amount,<br>        CancellationToken cancellationToken)<br>    {<br>        // Integrate with the card payment provider.<br>        return Task.CompletedTask;<br>    }<br>}</pre><p>A factory can select an implementation based on validated configuration or a payment method.</p><p>In <a href="http://asp.net/">ASP.NET</a> Core, you can also use dependency injection registrations and keyed services where appropriate instead of manually building a factory class.</p><p>Why use it?</p><ul><li>Centralizes creation or selection logic.</li><li>Reduces direct dependencies on concrete classes.</li><li>Makes it easier to introduce new implementations.</li><li>Keeps business services focused on their actual responsibilities.</li></ul><p>Real-world uses: Payment providers, notification channels, export formats, document generators, and storage implementations.</p><h3>3. Singleton Pattern — Share Application-Wide Services Carefully</h3><p>Some services should have one shared instance within a particular application process.</p><p>Examples include immutable configuration providers, certain caches, and thread-safe utility services.</p><p>The Singleton Pattern ensures that a particular class has only one instance within its defined scope.</p><p>In <a href="http://asp.net/">ASP.NET</a> Core, the dependency injection container can manage this lifecycle:</p><pre>builder.Services.AddSingleton&lt;IAppMetadata, AppMetadata&gt;();</pre><p>The container creates and shares an instance of AppMetadata for the application&#39;s lifetime.</p><p>However, a singleton is not the same as a single instance across every server in a distributed system. Each application process normally has its own singleton instance.</p><p>Also, singleton services should be thread-safe and must not directly capture scoped services such as a typical DbContext.</p><p>Why use it?</p><ul><li>Avoids repeatedly creating suitable shared objects.</li><li>Provides a consistent application-level instance.</li><li>Works naturally with <a href="http://asp.net/">ASP.NET</a> Core dependency injection.</li></ul><p>Common mistake: Making every service a singleton. That can introduce shared mutable state, concurrency bugs, and lifetime-related errors.</p><h3>4. Strategy Pattern — Replace Growing Conditional Logic</h3><p>Consider an e-commerce application with different discount policies.</p><p>Regular customers receive one discount, premium customers receive another, and promotional campaigns introduce additional pricing rules.</p><p>A large if-else block can become difficult to understand as the number of rules grows.</p><p>The Strategy Pattern places each algorithm behind a common interface so the application can select the appropriate behavior.</p><p>Example:</p><pre>public interface IDiscountStrategy<br>{<br>    decimal Apply(decimal total);<br>}</pre><pre>public sealed class RegularDiscount : IDiscountStrategy<br>{<br>    public decimal Apply(decimal total)<br>        =&gt; total * 0.95m;<br>}</pre><pre>public sealed class PremiumDiscount : IDiscountStrategy<br>{<br>    public decimal Apply(decimal total)<br>        =&gt; total * 0.85m;<br>}</pre><p>A pricing service can use the selected strategy without needing to know the details of every discount calculation.</p><p>In production, register the strategies with dependency injection and select them using validated business rules.</p><p>Why use it?</p><ul><li>Separates algorithms from the code that uses them.</li><li>Makes new business rules easier to introduce.</li><li>Improves testability.</li><li>Reduces complex conditional logic.</li></ul><p>Real-world uses: Pricing engines, tax calculations, authentication policies, shipping costs, and payment processing.</p><h3>5. Observer Pattern — React to Events Without Tight Coupling</h3><p>Placing an order can trigger several actions: updating inventory, sending a confirmation email, recording analytics, and notifying a warehouse.</p><p>If the order service directly manages every action, it gradually becomes responsible for too many unrelated operations.</p><p>The Observer Pattern allows interested components to react when something happens.</p><p>For example, an application can publish an OrderPlaced event. Separate handlers can respond by updating inventory or requesting an email notification.</p><pre>public sealed record OrderPlaced(<br>    Guid OrderId,<br>    string CustomerEmail);</pre><p>The event represents something that has already happened. Handlers can then perform the relevant work.</p><p>In a single application, this can be implemented with application events or in-process messaging. In distributed systems, a message broker such as RabbitMQ, Azure Service Bus, or Kafka may be appropriate.</p><p>Why use it?</p><ul><li>Reduces direct dependencies between features.</li><li>Makes it easier to add new event handlers.</li><li>Supports event-driven workflows.</li><li>Helps separate the main operation from secondary tasks.</li></ul><p>Production consideration: An in-memory event can be lost if the process stops unexpectedly. For reliable integration events, consider durable messaging, idempotent consumers, retries, and the transactional outbox pattern.</p><h3>6. Builder Pattern — Construct Complex Objects Readably</h3><p>Some objects require many optional settings. Passing every value through a long constructor can make code difficult to read and maintain.</p><p>The Builder Pattern lets developers assemble an object step by step.</p><p>For example, an export request might contain a file format, date range, selected columns, sorting rules, and pagination settings.</p><p>A builder can make its construction explicit:</p><pre>var request = new ExportRequestBuilder()<br>    .WithFormat(&quot;CSV&quot;)<br>    .WithDateRange(startDate, endDate)<br>    .IncludeColumn(&quot;OrderId&quot;)<br>    .IncludeColumn(&quot;Total&quot;)<br>    .Build();</pre><p>This example assumes you implement the corresponding builder and validation logic.</p><p>Why use it?</p><ul><li>Makes object construction easier to understand.</li><li>Handles optional parameters more clearly.</li><li>Can enforce required settings before creating an object.</li><li>Reduces reliance on constructors with many parameters.</li></ul><p>Real-world uses: Complex API requests, report generation, document creation, and SDK configuration.</p><p>For simple objects with only a few properties, an object initializer or record may be sufficient.</p><h3>7. Adapter Pattern — Integrate External Systems Cleanly</h3><p>Backend applications frequently communicate with third-party APIs, payment gateways, shipping providers, and legacy systems.</p><p>Each provider may have different request formats, response models, authentication requirements, and error-handling conventions.</p><p>The Adapter Pattern creates a boundary between your application’s expected interface and an external system’s interface.</p><p>For example, your application might define:</p><pre>public interface IShippingProvider<br>{<br>    Task&lt;string&gt; CreateShipmentAsync(<br>        ShipmentRequest request,<br>        CancellationToken cancellationToken);<br>}</pre><p>One adapter can implement this interface for a shipping provider, while another can integrate with a different provider.</p><p>The rest of your application depends on IShippingProvider, rather than understanding every external API&#39;s details.</p><p>Why use it?</p><ul><li>Keeps vendor-specific code isolated.</li><li>Simplifies integration testing.</li><li>Makes provider changes easier to manage.</li><li>Creates a consistent interface for multiple systems.</li></ul><p>Real-world uses: Payment gateways, shipping APIs, banking integrations, cloud storage, and legacy enterprise applications.</p><h3>8. Decorator Pattern — Add Behavior Without Changing the Core</h3><p>Suppose a service retrieves product information. Later, you want to add caching, metrics, logging, or other cross-cutting behavior.</p><p>One option is to place all these responsibilities inside the service itself. Over time, that makes the original logic harder to maintain.</p><p>The Decorator Pattern wraps an existing implementation with another implementation of the same interface, adding behavior before or after the original operation.</p><p>Conceptually, the call might pass through:</p><p>Metrics → Logging → Cache → Product Service</p><p>The exact order depends on how the decorators are composed.</p><p>In <a href="http://asp.net/">ASP.NET</a> Core, middleware provides a related wrapping model for HTTP requests and responses. Dependency injection can also be used to compose decorated services.</p><p>Why use it?</p><ul><li>Adds behavior without changing the original class.</li><li>Encourages small, focused components.</li><li>Allows different combinations of functionality.</li><li>Keeps cross-cutting concerns separate from core business logic.</li></ul><p>Real-world uses: Caching, telemetry, request logging, performance measurement, and selected authorization-related behaviors.</p><p>Note that middleware, decorators, and interceptors are related concepts, but they aren’t identical implementations of the same pattern.</p><h3>9. CQRS — Separate Commands from Queries</h3><p>In many applications, reading information and changing information have different requirements.</p><p>A reporting dashboard might need complex queries across millions of records, while an order-processing workflow must validate and safely persist transactional changes.</p><p>Command Query Responsibility Segregation, or CQRS, separates operations that change state from operations that retrieve information.</p><ul><li>Commands express an intention to change data, such as PlaceOrder.</li><li>Queries retrieve information, such as GetOrderDetails.</li></ul><p>These operations can have different handlers and models, even when they share the same database.</p><p>In larger systems, the read and write sides may use different storage technologies or independently scaled infrastructure.</p><p>Why use it?</p><ul><li>Clarifies the responsibilities of read and write operations.</li><li>Allows independent optimization of complex queries.</li><li>Can support different scaling requirements.</li><li>Helps organize complex business workflows.</li></ul><p>Important: CQRS does not automatically require two databases or microservices. For many applications, separate handlers over one database are sufficient.</p><p>Start with a simpler architecture and introduce more separation only when the business and performance requirements justify it.</p><h3>10. Circuit Breaker Pattern — Prevent Cascading Failures</h3><p>Your API calls a third-party payment service. Suddenly, that service becomes slow or unavailable.</p><p>If your application continues making requests that repeatedly time out, it can exhaust connection pools, occupy resources, and affect otherwise healthy endpoints.</p><p>The Circuit Breaker Pattern temporarily stops calls to a dependency after a configured failure threshold is reached.</p><p>It generally has three states:</p><ul><li>Closed: Requests are allowed through.</li><li>Open: Requests are blocked or fail fast for a period.</li><li>Half-open: A limited number of requests test whether the dependency has recovered.</li></ul><p>If the dependency recovers, the circuit closes. If failures continue, it opens again.</p><p>In .NET, Polly provides resilience strategies that can be composed with HTTP clients and other operations. Modern .NET applications can also use the resilience integration available through Microsoft.Extensions.Http.Resilience.</p><p>Why use it?</p><ul><li>Avoids repeatedly waiting on an unhealthy dependency.</li><li>Helps protect application resources.</li><li>Can reduce cascading failures.</li><li>Improves resilience when combined with appropriate timeouts and retry policies.</li></ul><p>Important: A circuit breaker doesn’t fix the underlying failure. Configure it with sensible timeouts, limited retries, observability, and appropriate fallback behavior. Retries should be used carefully, particularly for operations that aren’t safe to repeat.</p><h3>How These Patterns Work Together in a Real Application</h3><p>Consider an online shopping platform built with <a href="http://asp.net/">ASP.NET</a> Core.</p><p>A customer places an order. A pricing service uses the Strategy Pattern to calculate discounts. A payment integration selects the correct provider, while an Adapter translates the provider’s API into the application’s internal interface.</p><p>The Repository Pattern handles the required persistence operations. After the order is successfully committed, an event can notify separate handlers to update inventory and send notifications.</p><p>The Circuit Breaker Pattern protects calls to an unhealthy external dependency. Decorators can add caching or metrics where appropriate, while CQRS can separate complex reporting queries from transactional operations.</p><p>These patterns solve different problems. They work together because the architecture assigns each responsibility to the component best suited to handle it.</p><p>The result isn’t simply more classes or interfaces. The real goal is to make the application’s dependencies, behavior, and failure boundaries easier to understand.</p><h3>Common Design Pattern Mistakes to Avoid</h3><p>Knowing the names of design patterns isn’t enough. Applying them at the wrong time can make a codebase more complicated rather than less.</p><p>1. Adding abstractions without a real need</p><p>A simple CRUD service may not benefit from a custom repository, factory, and several additional interfaces. Start with the simplest design that meets your requirements.</p><p>2. Treating every pattern as a mandatory rule</p><p>Design patterns are tools, not a checklist. Use them when they address an identifiable problem.</p><p>3. Ignoring testing and operational behavior</p><p>An event-driven design still needs reliable event handling. A circuit breaker still needs monitoring. A repository still needs correct query behavior.</p><p>4. Confusing scalability with the number of patterns</p><p>Adding CQRS or microservices doesn’t automatically make an application scalable. Performance also depends on database queries, caching, concurrency, infrastructure, and actual workload.</p><p>5. Ignoring the capabilities of your framework</p><p><a href="http://asp.net/">ASP.NET</a> Core already provides dependency injection, middleware, configuration, HTTP client integration, and many other building blocks. Understand what the framework offers before implementing a custom solution.</p><h3>Final Thoughts</h3><p>Building production-ready backend software isn’t about using the largest number of design patterns. It’s about understanding the problems your system faces and choosing an appropriate solution.</p><p>Start with Repository and Strategy when you need clear boundaries around data access and business rules. Explore Factory and Adapter when object creation or external integrations become difficult to manage. Use events when independent components need to react to changes, and consider CQRS or Circuit Breaker when the complexity of your workload or dependencies warrants them.</p><p>For .NET developers, the next step is practical: choose one pattern, implement it in a small <a href="http://asp.net/">ASP.NET</a> Core project, write tests, and observe how it changes the design.</p><p>The best backend architecture isn’t the most complicated one. It’s the one your team can understand, test, operate, and evolve with confidence.</p><h3>Your Turn</h3><p>Which design pattern has helped you the most in a real-world project?</p><p>Have you found CQRS valuable, or do you prefer keeping applications simple with conventional services and repositories?</p><p>Share your experience in the comments.</p><p>#DotNet #CSharp #BackendDevelopment #SoftwareArchitecture #DesignPatterns #ASPNetCore #CleanCode #SoftwareEngineering</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cfdaaf1e929" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ AI Coding Assistant vs AI Coding Agent — What’s the REAL Difference?]]></title>
            <link>https://medium.com/@sachinghadi/ai-coding-assistant-vs-ai-coding-agent-whats-the-real-difference-65efca68e6c1?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/65efca68e6c1</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-coding-agent]]></category>
            <category><![CDATA[ai-coding-assistant]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 06:42:22 GMT</pubDate>
            <atom:updated>2026-10-27T06:42:22.473Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AAQi3WxaG1DnJ9y_1udxoA.png" /></figure><p>AI is changing the way we build software.</p><p>But here’s something every developer should understand:</p><p>👉 An AI assistant helps you write code. An AI agent can help you complete an entire development task.</p><p>Let’s understand this with a simple example. 👇</p><p>🔹 1. AI Coding Assistant — Your Smart Coding Partner</p><p>Think of tools like GitHub Copilot.</p><p>You’re writing a C# method, and you need help.</p><p>An AI assistant can:</p><p>✅ Suggest code while you type</p><p>✅ Explain complex logic</p><p>✅ Find and fix potential errors</p><p>✅ Generate unit tests</p><p>✅ Refactor existing code</p><p>💡 You remain in control and guide the process.</p><p>Example: You ask AI to write a method that calculates the total price of an order, and it suggests the C# code.</p><p>🔹 2. AI Coding Agent — Your Task-Oriented Developer Assistant</p><p>An AI coding agent can work toward a goal by planning and performing multiple steps using available tools.</p><p>It can:</p><p>✅ Understand a task or requirement</p><p>✅ Break the task into smaller steps</p><p>✅ Create or modify multiple files</p><p>✅ Run tests and inspect failures</p><p>✅ Iterate on changes based on results</p><p>✅ Prepare code for review</p><p>💡 Depending on its tools and permissions, an agent can handle more of the workflow with less step-by-step guidance.</p><p>Example: You ask an agent to create a .NET Web API for managing blog posts.</p><p>It may create the project structure, write endpoints, configure Entity Framework Core, generate tests, run them, and fix issues it encounters.</p><p>Of course, the result still needs proper review and validation.</p><p>🔹 3. Human Review — The Essential Safety Net</p><p>Here’s where experienced developers remain critical.</p><p>Before accepting AI-generated changes, review:</p><p>✅ Code quality and architecture</p><p>✅ Security vulnerabilities</p><p>✅ Test coverage and edge cases</p><p>✅ Performance and maintainability</p><p>✅ Business requirements</p><p>✅ Deployment and operational risks</p><p>Remember: AI-generated code is not automatically production-ready code.</p><p>🔹 4. How They Work Together</p><p>Imagine building a new feature in <a href="http://asp.net/">ASP.NET</a> Core.</p><p>👨‍💻 You define the requirement.</p><p>🤖 The AI agent plans and implements the feature.</p><p>🧪 Automated tests check whether the code behaves as expected.</p><p>🔍 You review the implementation, security, and business logic.</p><p>🚀 After the necessary checks and approvals, the feature can be deployed.</p><p>The result? Less repetitive work and more time to focus on engineering decisions.</p><p>🔹 5. Why Does This Matter for .NET Developers?</p><p>Whether you work with C#, <a href="http://asp.net/">ASP.NET</a> Core, Entity Framework Core, SQL Server, React, or Angular, understanding AI-assisted development is becoming increasingly useful.</p><p>The goal isn’t to replace fundamental programming knowledge.</p><p>It’s to combine that knowledge with AI to build software more effectively.</p><p>💡 My Pro Tip:</p><p>Don’t try to automate your entire development workflow on day one.</p><p>Start small:</p><p>1️⃣ Use an AI assistant for code suggestions and explanations.</p><p>2️⃣ Let it help generate unit tests and documentation.</p><p>3️⃣ Experiment with an AI coding agent on a small, well-defined feature.</p><p>4️⃣ Review every important change and measure the results.</p><p>5️⃣ Expand automation only when it proves reliable.</p><p>🎯 The key takeaway:</p><p>AI assistants help you write code faster.</p><p>AI agents help you automate more of the development workflow.</p><p>And skilled developers bring the judgment needed to turn generated code into reliable software.</p><p>The future belongs to developers who understand both software engineering fundamentals and how to use AI effectively.</p><p>💬 Question for developers: Are you currently using an AI coding assistant, experimenting with AI coding agents, or still writing most of your code manually?</p><p>Share your experience in the comments!</p><p>♻️ Save this post for your next development session and share it with a developer exploring AI-powered software development.</p><p>follow me on Medium: <a href="https://medium.com/@sachinghadi">https://medium.com/@sachinghadi</a></p><p>#DotNet #CSharp #ArtificialIntelligence #AICoding #GitHubCopilot #ASPNetCore #SoftwareDevelopment #DeveloperProductivity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65efca68e6c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Critical PHP Security Alert: Two Vulnerabilities Every Website Owner Should Know About]]></title>
            <link>https://medium.com/@sachinghadi/critical-php-security-alert-two-vulnerabilities-every-website-owner-should-know-about-7ac52d994436?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ac52d994436</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Fri, 23 Oct 2026 05:18:10 GMT</pubDate>
            <atom:updated>2026-10-23T05:18:10.245Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hCOYtdpjv9n3QfI8HL6w-g.png" /></figure><p><strong>Your website can look perfectly normal and still have a serious security problem running in the background.</strong></p><p>On October 21, 2026, the PHP development team released urgent security updates to fix two critical vulnerabilities that could allow attackers to execute code on vulnerable web servers without logging in.</p><p>If your website uses WordPress, Laravel, Joomla, Drupal, Magento, or another PHP-based platform, this update deserves your attention.</p><p>Let’s understand what happened, why it matters, and what you should do next.</p><h3>🔍 What are these vulnerabilities?</h3><p>The two vulnerabilities are:</p><ul><li><strong>CVE-2026–109618:</strong> Related to memory corruption when PHP encounters an out-of-memory condition.</li><li><strong>CVE-2026–109619:</strong> Related to stale internal state, where PHP may access data that should no longer be used.</li></ul><p>In simple words, these issues involve how PHP handles memory and internal data while processing requests.</p><p>Under certain conditions, an attacker could exploit these weaknesses to execute code on a vulnerable server without authentication.</p><p>This is serious because an attacker may not need a valid account to attempt an attack.</p><p>Both vulnerabilities have been rated critical by the PHP security team. The official severity rating is CVSS 4.0 9.2.</p><h3>🌐 Which websites are affected?</h3><p>The risk is not limited to WordPress.</p><p>Any website or application using a vulnerable PHP runtime to process web requests may be affected. This can include websites built with:</p><ul><li>WordPress</li><li>Laravel</li><li>Joomla</li><li>Drupal</li><li>Magento</li><li>PrestaShop</li><li>Custom PHP applications</li></ul><p>The actual risk depends on the PHP version, hosting environment, and configuration.</p><p><strong>Important:</strong> Updating WordPress plugins or changing from PHP 8.3 to PHP 8.4 does not automatically solve the problem. You need to confirm that the specific PHP installation has received the security fix.</p><h3>🛠️ Which PHP versions contain the fix?</h3><p>According to the official PHP release announcements, the patched versions are:</p><ul><li>PHP 8.2.35</li><li>PHP 8.3.36</li><li>PHP 8.4.27</li><li>PHP 8.5.12</li></ul><p>If you are using one of these branches, make sure you have the corresponding patched release or a verified vendor-provided security backport.</p><p>If you are using PHP 8.1 or an older version, contact your hosting provider or software vendor. These branches are no longer maintained by the main PHP project, although some vendors may provide backported security fixes.</p><h3>✅ What should website owners do now?</h3><p>Here are five practical steps.</p><p><strong>1. Check your PHP version</strong></p><p>Log in to your hosting panel and check the PHP version used by your website.</p><p>If you have terminal access, run:</p><p>php -v</p><p>Remember that this command may show the command-line PHP version, which can differ from the version used by your website. Ask your hosting provider to verify the web-facing PHP runtime as well.</p><p><strong>2. Update PHP immediately</strong></p><p>Contact your hosting provider or system administrator and request the appropriate security update.</p><p>Before changing versions, check compatibility with your website and take a backup. After updating, confirm that the patched runtime is actually serving web requests.</p><p><strong>3. Review sensitive files</strong></p><p>Check that files such as wp-config.php and .env cannot be downloaded or read publicly. These files may contain database credentials, API keys, and other secrets.</p><p><strong>4. Use additional security protections</strong></p><p>A web application firewall, sensible request-size limits, monitoring, and restricted server access can help reduce risk.</p><p>However, these are additional layers of protection. They do not replace the PHP security update.</p><p><strong>5. Verify and monitor</strong></p><p>After patching, verify the installed version or vendor patch status. Review relevant server logs and investigate suspicious activity.</p><p>If you suspect a compromise, consider rotating exposed credentials and follow your incident-response process.</p><h3>☁️ Can Cloudflare fix the problem?</h3><p>Cloudflare and other security services can provide useful protection against certain malicious requests.</p><p>However, putting a website behind a firewall should not be treated as proof that a vulnerable PHP runtime is safe. Protection depends on the specific rules, traffic paths, and attack methods involved.</p><p>The safest approach is to patch PHP and use additional security controls as a second layer of defence.</p><h3>💡 My biggest takeaway</h3><p>Website security is not just about strong passwords, SSL certificates, or installing security plugins.</p><p>It also depends on the software running behind the scenes.</p><p>A single vulnerability in a widely used technology can affect thousands of applications, even when those applications are built by different developers.</p><p>As developers, IT teams, hosting providers, and business owners, we all have a role to play in keeping systems secure.</p><p><strong>Don’t wait for a security incident to check whether your website is protected.</strong></p><p>Check your PHP installation, apply the official fix, and verify that the update is complete.</p><h3>🤝 Let’s discuss</h3><p>Do you manage a PHP-based website?</p><p>Have you checked whether your hosting provider has applied these security updates?</p><p>Share your experience in the comments so other website owners can learn from it.</p><p>Stay informed. Stay updated. Stay secure.</p><p>#CyberSecurity #PHP #WebDevelopment #WordPress #ApplicationSecurity #DevSecOps #WebsiteSecurity</p><p><strong>Technical references for verification</strong></p><ul><li>Official PHP security releases: <a href="https://www.php.net/">https://www.php.net/</a></li><li>CERT-EU security advisory: <a href="https://cert.europa.eu/publications/security-advisories/2026-018/">https://cert.europa.eu/publications/security-advisories/2026-018/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ac52d994436" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[       …]]></title>
            <link>https://medium.com/@sachinghadi/-499ba50a9b21?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/499ba50a9b21</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[scion]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Thu, 22 Oct 2026 04:51:03 GMT</pubDate>
            <atom:updated>2026-10-22T04:51:03.993Z</atom:updated>
            <content:encoded><![CDATA[<h3>𝗔𝗻𝘁𝗵𝗿𝗼𝗽𝗶𝗰 𝗿𝗲𝗽𝗹𝗮𝗰𝗲𝗱 𝗚𝗶𝘁 𝗳𝗼𝗿 𝗶𝘁𝘀 𝗺𝗮𝗶𝗻 𝗰𝗼𝗱𝗲𝗯𝗮𝘀𝗲 𝘄𝗶𝘁𝗵 𝗦𝗰𝗶𝗼𝗻 ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ELXEglZLCoAOaBF3Dy0SA.png" /></figure><p>🎭 Git: “Bro, what did I do wrong?”<br>🤖 AI Agents: “Nothing, bro. We just went from a few commits to 30,000 changes a day!” 😂</p><p>𝗔𝗻𝘁𝗵𝗿𝗼𝗽𝗶𝗰 𝗿𝗲𝗽𝗹𝗮𝗰𝗲𝗱 𝗚𝗶𝘁 𝗳𝗼𝗿 𝗶𝘁𝘀 𝗺𝗮𝗶𝗻 𝗰𝗼𝗱𝗲𝗯𝗮𝘀𝗲 𝘄𝗶𝘁𝗵 𝗦𝗰𝗶𝗼𝗻.<br>Before you start panicking and planning a migration, relax! Git isn’t going anywhere. 😄<br>Let’s break this down in a cartoonist way. 🎬</p><p>🎨 𝗦𝗰𝗲𝗻𝗲 𝟭: 𝗚𝗶𝘁, 𝘁𝗵𝗲 𝗢𝗚<br>Git was built for developers who write code, commit changes, push, pull, and occasionally spend half a day resolving merge conflicts.<br>Git: “One developer, one repository, plenty of coffee. I’ve got this!” ☕💻</p><p>🎨 𝗦𝗰𝗲𝗻𝗲 𝟮: 𝗔𝗜 𝗔𝗴𝗲𝗻𝘁𝘀 𝗘𝗻𝘁𝗲𝗿 𝘁𝗵𝗲 𝗖𝗵𝗮𝘁<br>According to Anthropic’s engineering blog, merged code changes jumped from around 𝟮,𝟱𝟬𝟬 𝗽𝗲𝗿 𝗱𝗮𝘆 𝗶𝗻 𝗠𝗮𝘆 𝘁𝗼 𝗼𝘃𝗲𝗿 𝟯𝟬,𝟬𝟬𝟬 𝗽𝗲𝗿 𝗱𝗮𝘆 𝗶𝗻 𝗦𝗲𝗽𝘁𝗲𝗺𝗯𝗲𝗿.<br>That’s more than 12 times the volume! 🚀<br>AI agents don’t wait for coffee breaks, weekends, or Monday motivation.<br>Git: “Guys, can we please slow down a little?” 😅</p><p>🎨 𝗦𝗰𝗲𝗻𝗲 𝟯: 𝗠𝗲𝗲𝘁 𝗦𝗰𝗶𝗼𝗻 🦸<br>Instead of forcing Git to handle a workload it wasn’t designed for, Anthropic built 𝗦𝗰𝗶𝗼𝗻, its own version control system.<br>What’s different about the architecture?<br>🔹 Git traditionally gives each developer a full local repository.<br>🔹 Scion moves more of the heavy lifting to the server.<br>🔹 Clients fetch only the files they actually need.<br>The result? An architecture better suited to Anthropic’s agent-heavy workflow.<br>And here’s the impressive part: a team of just seven built it and migrated the monorepo in about five months. 👀</p><p>🎨 𝗦𝗰𝗲𝗻𝗲 𝟰: 𝗧𝗵𝗲 𝗥𝗲𝗮𝗹 𝗣𝗹𝗼𝘁 𝗧𝘄𝗶𝘀𝘁 💥<br>Does this mean Git is dead?<br>𝗔𝗯𝘀𝗼𝗹𝘂𝘁𝗲𝗹𝘆 𝗻𝗼𝘁!<br>Anthropic itself says Scion is not intended to be a general-purpose Git replacement.<br>For most developers and teams, Git remains the right tool.<br>So please don’t migrate your side project this weekend just because AI is trending. 😂</p><p>💡 𝗧𝗵𝗲 𝗯𝗶𝗴𝗴𝗲𝗿 𝗹𝗲𝘀𝘀𝗼𝗻 𝗶𝘀 𝗮𝗯𝗼𝘂𝘁 𝘀𝘆𝘀𝘁𝗲𝗺 𝗱𝗲𝘀𝗶𝗴𝗻.<br>Every tool comes with assumptions.<br>Git was designed around a world where developers work locally and maintain complete repositories.<br>But when AI agents generate changes at massive scale, those assumptions can become bottlenecks.<br>Sometimes, the right solution isn’t to optimize the existing tool.<br>𝗜𝘁’𝘀 𝘁𝗼 𝗿𝗲𝘁𝗵𝗶𝗻𝗸 𝘁𝗵𝗲 𝗮𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲.<br>And one more thing I loved about this story: engineers still had to tell Claude “𝗡𝗢.”<br>Because generating code faster is one thing. Knowing what should be built is another. 🧠</p><p>👨‍💻 𝗠𝘆 𝘁𝗮𝗸𝗲𝗮𝘄𝗮𝘆:<br>The future isn’t just about AI writing more code. It’s about rethinking the entire software development workflow around the speed of AI.</p><p>If AI agents keep accelerating software development, what do you think will become the next bottleneck?<br>🔹 Git and version control<br>🔹 CI/CD pipelines<br>🔹 Code reviews<br>🔹 Testing and debugging<br>🔹 Or humans trying to keep up with all those PRs? 😂<br><a href="https://www.linkedin.com/search/results/all/?keywords=%23git&amp;origin=HASH_TAG_FROM_FEED">#Git</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23scion&amp;origin=HASH_TAG_FROM_FEED">#Scion</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23ai&amp;origin=HASH_TAG_FROM_FEED">#Ai</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=499ba50a9b21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ 5 async/await Mistakes Every .NET Developer Should Avoid]]></title>
            <link>https://medium.com/@sachinghadi/5-async-await-mistakes-every-net-developer-should-avoid-6ab29dbae07d?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ab29dbae07d</guid>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[asyncawait]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 08:47:16 GMT</pubDate>
            <atom:updated>2026-10-20T08:47:16.726Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xkdTl1HymgacKY7lApYZQA.png" /></figure><p><strong>A practical guide with real-world C# examples</strong></p><p>Have you ever wondered why your ASP.NET Core API becomes slow when multiple users access it at the same time?</p><p>Sometimes, the problem isn’t your database or server capacity. It might be how your code handles asynchronous operations.</p><p>The async and await keywords help us write non-blocking code, especially when working with databases, external APIs, files, and other I/O operations.</p><p>But using async and await incorrectly can introduce performance problems, unexpected behavior, and unnecessary complexity.</p><p>Let’s explore five common mistakes using a real-world e-commerce application.</p><h3>🛒 Real-world scenario: An e-commerce order API</h3><p>Imagine a customer opens their order history page.</p><p>Your ASP.NET Core API needs to retrieve the customer’s orders from a database and fetch payment information from an external payment service.</p><p>Both operations involve waiting for external systems.</p><p>Let’s see how to handle these situations correctly.</p><h3>❌ Mistake 1: Blocking asynchronous code with .Result or .Wait()</h3><h3>The wrong approach</h3><pre>public IActionResult GetOrders()<br>{<br>    var orders = _orderService<br>        .GetOrdersAsync()<br>        .Result;</pre><pre>    return Ok(orders);<br>}</pre><h3>Why is this a problem?</h3><p>The .Result property blocks the current thread until the asynchronous operation finishes.</p><p>Imagine 500 requests arriving at your API. If many requests block their threads while waiting for database responses, thread-pool resources can become exhausted, increasing latency and reducing throughput.</p><p>ASP.NET Core generally avoids the classic ASP.NET synchronization-context deadlock scenario, but blocking can still hurt scalability.</p><h3>✅ The better approach</h3><pre>public async Task&lt;IActionResult&gt; GetOrders()<br>{<br>    var orders = await _orderService<br>        .GetOrdersAsync();</pre><pre>    return Ok(orders);<br>}</pre><p>Now, the request can await the database operation without unnecessarily blocking the thread.</p><p><strong>Remember:</strong> Prefer await over .Result and .Wait() when consuming asynchronous APIs.</p><h3>❌ Mistake 2: Using async void instead of async Task</h3><h3>The wrong approach</h3><pre>public async void SaveOrderAsync()<br>{<br>    await _repository.SaveAsync();<br>}</pre><p>What’s wrong here?</p><p>A caller cannot await this method, and it cannot observe its completion through a returned task. Exceptions are also harder to handle correctly.</p><h3>✅ The better approach</h3><pre>public async Task SaveOrderAsync()<br>{<br>    await _repository.SaveAsync();<br>}</pre><p>Now the calling code can wait for the operation and handle errors:</p><pre>try<br>{<br>    await SaveOrderAsync();<br>}<br>catch (Exception ex)<br>{<br>    // Log or handle the error appropriately.<br>    throw;<br>}</pre><p><strong>When should you use </strong><strong>async void?</strong></p><p>Generally, reserve it for event handlers that require a void return type. For regular application methods, prefer Task or Task&lt;T&gt;.</p><h3>❌ Mistake 3: Waiting for independent operations one by one</h3><p>Suppose the order page needs both order details and payment information.</p><p>These operations are independent, so they don’t necessarily need to run sequentially.</p><h3>The slower approach</h3><pre>var orders = await _orderService<br>    .GetOrdersAsync();</pre><pre>var payments = await _paymentService<br>    .GetPaymentsAsync();</pre><p>If fetching orders takes 2 seconds and fetching payments takes 3 seconds, the total waiting time could be approximately 5 seconds.</p><h3>✅ The better approach</h3><pre>var ordersTask = _orderService<br>    .GetOrdersAsync();</pre><pre>var paymentsTask = _paymentService<br>    .GetPaymentsAsync();</pre><pre>await Task.WhenAll(ordersTask, paymentsTask);</pre><pre>var orders = await ordersTask;<br>var payments = await paymentsTask;</pre><p>Now both operations can make progress concurrently. If they take approximately 2 and 3 seconds respectively, the total waiting time may be closer to 3 seconds, excluding overhead.</p><p><strong>Important:</strong> Use this pattern only when the operations are independent and the underlying services support concurrent calls. If one operation depends on the result of another, await them in sequence.</p><p>Also, avoid launching an unbounded number of concurrent database operations, particularly when using a shared Entity Framework Core DbContext, which isn&#39;t thread-safe.</p><h3>❌ Mistake 4: Thinking async automatically makes everything faster</h3><p>Consider this method:</p><pre>public async Task&lt;int&gt; CalculateTotalAsync()<br>{<br>    int total = 0;</pre><pre>    for (int i = 0; i &lt; 1_000_000; i++)<br>    {<br>        total += i;<br>    }</pre><pre>    return total;<br>}</pre><p>The method uses async, but it doesn&#39;t await any asynchronous operation.</p><p>The compiler will warn that the method lacks await and will execute the CPU-bound loop synchronously.</p><h3>✅ The better approach</h3><p>For a small calculation, simply use a synchronous method:</p><pre>public int CalculateTotal()<br>{<br>    int total = 0;</pre><pre>    for (int i = 0; i &lt; 1_000_000; i++)<br>    {<br>        total += i;<br>    }</pre><pre>    return total;<br>}</pre><p>For expensive CPU-bound work, consider a suitable background-processing strategy or parallel computation when justified. Moving CPU-bound work to Task.Run isn&#39;t automatically beneficial in ASP.NET Core and can consume additional thread-pool resources.</p><p><strong>Remember:</strong> async is particularly useful for I/O-bound operations. It doesn&#39;t magically make CPU-intensive work execute faster.</p><h3>❌ Mistake 5: Ignoring cancellation in long-running operations</h3><p>Imagine a customer starts a report download and then closes the browser.</p><p>If the operation supports cancellation but your code ignores the cancellation signal, it may continue doing unnecessary work.</p><h3>The wrong approach</h3><pre>public async Task&lt;IActionResult&gt; GetReport()<br>{<br>    var report = await _reportService<br>        .GenerateReportAsync();</pre><pre>    return Ok(report);<br>}</pre><h3>✅ The better approach</h3><p>ASP.NET Core exposes a cancellation token through HttpContext.RequestAborted.</p><pre>public async Task&lt;IActionResult&gt; GetReport(<br>    CancellationToken cancellationToken)<br>{<br>    var report = await _reportService<br>        .GenerateReportAsync(cancellationToken);</pre><pre>    return Ok(report);<br>}</pre><p>Your service should accept and pass the token to operations that support cancellation.</p><pre>public async Task&lt;Report&gt; GenerateReportAsync(<br>    CancellationToken cancellationToken)<br>{<br>    return await _repository<br>        .GetReportAsync(cancellationToken);<br>}</pre><p>Cancellation is cooperative: the underlying operation must observe and honor the token. It won’t automatically stop arbitrary code or undo work already completed.</p><p><strong>Remember:</strong> Propagate cancellation tokens through long-running database, HTTP, and file operations whenever supported.</p><h3>🎯 Bonus: A few async/await best practices</h3><ul><li>Use Task&lt;T&gt; when an asynchronous method returns a value.</li><li>Prefer Task over async void for regular methods.</li><li>Avoid blocking asynchronous operations with .Result and .Wait().</li><li>Use Task.WhenAll when independent operations can safely run concurrently.</li><li>Pass cancellation tokens to operations that support cancellation.</li><li>Don’t add async to a method unless it needs asynchronous behavior.</li><li>Use ConfigureAwait(false) when appropriate in reusable libraries; it is not a universal requirement in ASP.NET Core application code.</li><li>Avoid fire-and-forget tasks for important business operations unless their lifecycle, error handling, and reliability are explicitly managed.</li></ul><h3>💡 Final takeaway</h3><p>Writing asynchronous code isn’t just about adding async and await everywhere.</p><p>It’s about choosing the right execution model, avoiding unnecessary blocking, handling failures correctly, and making efficient use of server resources.</p><p>Small improvements in asynchronous programming can make a meaningful difference in the scalability and maintainability of your .NET applications.</p><p><strong>Question for developers:</strong> Which async/await mistake have you encountered most often in real-world projects?</p><p>Share your experience in the comments!</p><p>♻️ Save this post for your next .NET project, and share it with a fellow developer.</p><p>#dotnet #csharp #aspnetcore #asyncawait #webdevelopment #softwareengineering #programming</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ab29dbae07d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOLID Principles in C#: A Beginner-Friendly Guide with Real-World Examples]]></title>
            <link>https://medium.com/@sachinghadi/solid-principles-in-c-a-beginner-friendly-guide-with-real-world-examples-9bde682b18fe?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bde682b18fe</guid>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[solid-principles]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 13:30:41 GMT</pubDate>
            <atom:updated>2026-10-19T13:30:41.180Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nb4-eqnxN8WvBvf58x60kA.png" /></figure><p>💥 𝗪𝗿𝗶𝘁𝗶𝗻𝗴 𝗰𝗹𝗲𝗮𝗻 𝗰𝗼𝗱𝗲 𝗶𝘀𝗻’𝘁 𝗷𝘂𝘀𝘁 𝗮𝗯𝗼𝘂𝘁 𝗺𝗮𝗸𝗶𝗻𝗴 𝗶𝘁 𝘄𝗼𝗿𝗸 — 𝗶𝘁’𝘀 𝗮𝗯𝗼𝘂𝘁 𝗺𝗮𝗸𝗶𝗻𝗴 𝗶𝘁 𝗲𝗮𝘀𝘆 𝘁𝗼 𝗰𝗵𝗮𝗻𝗴𝗲, 𝘁𝗲𝘀𝘁, 𝗮𝗻𝗱 𝗺𝗮𝗶𝗻𝘁𝗮𝗶𝗻!</p><p>🚀 If you’re learning 𝗖#, .𝗡𝗘𝗧, 𝗼𝗿 𝗔𝗦𝗣.𝗡𝗘𝗧 𝗖𝗼𝗿𝗲, understanding the 𝗦𝗢𝗟𝗜𝗗 𝗽𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲𝘀 can help you write better software.</p><p>Here’s a simple breakdown of all five principles with real-world examples 👇</p><p>🔹 𝗦 — 𝗦𝗶𝗻𝗴𝗹𝗲 𝗥𝗲𝘀𝗽𝗼𝗻𝘀𝗶𝗯𝗶𝗹𝗶𝘁𝘆 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗦𝗥𝗣)</p><p>One class = one clear responsibility. Avoid creating classes that do everything.</p><p>🔹 𝗢 — 𝗢𝗽𝗲𝗻/𝗖𝗹𝗼𝘀𝗲𝗱 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗢𝗖𝗣)</p><p>Add new features without constantly changing existing, working code.</p><p>🔹 𝗟 — 𝗟𝗶𝘀𝗸𝗼𝘃 𝗦𝘂𝗯𝘀𝘁𝗶𝘁𝘂𝘁𝗶𝗼𝗻 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗟𝗦𝗣)</p><p>A child class should work wherever its parent class is expected — without breaking behavior.</p><p>🔹 𝗜 — 𝗜𝗻𝘁𝗲𝗿𝗳𝗮𝗰𝗲 𝗦𝗲𝗴𝗿𝗲𝗴𝗮𝘁𝗶𝗼𝗻 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗜𝗦𝗣)</p><p>Keep interfaces small and focused. Don’t force classes to implement methods they don’t need.</p><p>🔹 𝗗 — 𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝘆 𝗜𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻 𝗣𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 (𝗗𝗜𝗣)</p><p>Depend on abstractions, not concrete implementations. This makes your code easier to test and more flexible.</p><p>💡 𝗪𝗵𝘆 𝗱𝗼𝗲𝘀 𝗦𝗢𝗟𝗜𝗗 𝗺𝗮𝘁𝘁𝗲𝗿?</p><p>✅ Cleaner, more readable code</p><p>✅ Easier testing and debugging</p><p>✅ Fewer breaking changes</p><p>✅ Better maintainability and scalability</p><p>🎯 𝗣𝗿𝗼 𝘁𝗶𝗽: 𝗬𝗼𝘂 𝗱𝗼𝗻’𝘁 𝗻𝗲𝗲𝗱 𝘁𝗼 𝗮𝗽𝗽𝗹𝘆 𝗲𝘃𝗲𝗿𝘆 𝗽𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 𝗯𝗹𝗶𝗻𝗱𝗹𝘆. 𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱 𝘁𝗵𝗲 𝗽𝗿𝗼𝗯𝗹𝗲𝗺 𝗳𝗶𝗿𝘀𝘁, 𝘁𝗵𝗲𝗻 𝘂𝘀𝗲 𝘁𝗵𝗲 𝗽𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 𝘄𝗵𝗲𝗿𝗲 𝗶𝘁 𝗮𝗱𝗱𝘀 𝘃𝗮𝗹𝘂𝗲.</p><p>💬 𝗪𝗵𝗶𝗰𝗵 𝗦𝗢𝗟𝗜𝗗 𝗽𝗿𝗶𝗻𝗰𝗶𝗽𝗹𝗲 𝗱𝗼 𝘆𝗼𝘂 𝗳𝗶𝗻𝗱 𝘁𝗵𝗲 𝗵𝗮𝗿𝗱𝗲𝘀𝘁 𝘁𝗼 𝗮𝗽𝗽𝗹𝘆 𝗶𝗻 𝗿𝗲𝗮𝗹-𝘄𝗼𝗿𝗹𝗱 𝗽𝗿𝗼𝗷𝗲𝗰𝘁𝘀? Share your experience in the comments!</p><p>♻️ Save this post for your next coding session and share it with a developer who’s learning clean architecture.</p><p>#SOLID #DotNet #CSharp #ASPNETCore #CleanCode #SoftwareArchitecture #SoftwareDevelopment #Programming</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bde682b18fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Building AI Agents Is Easy. Building Enterprise-Ready AI Agents Is Architecture.]]></title>
            <link>https://medium.com/@sachinghadi/building-ai-agents-is-easy-building-enterprise-ready-ai-agents-is-architecture-9d52fb67e4de?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d52fb67e4de</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai-orchestration]]></category>
            <category><![CDATA[guardrail]]></category>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 06:41:41 GMT</pubDate>
            <atom:updated>2026-10-12T06:41:41.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbBE8mr11M0O_ISX4ggShw.png" /></figure><p>Everyone is talking about AI Agents, MCP, RAG, and automation.</p><p>But as a Solution Architect, I believe the real challenge isn’t building an AI agent that works in a demo.</p><p>The real challenge is making it secure, reliable, scalable, and useful in production.</p><p>Imagine building an AI assistant for an enterprise application using .NET and Azure.</p><p>A user asks:</p><p><em>“Find the latest invoice for a customer, summarize the payment history, and create a support ticket if payment is overdue.”</em></p><p>Sounds simple, right?</p><p>Now think about what happens behind the scenes. 👇</p><p>🔹 1. RAG — Give AI the right knowledge</p><p>Retrieve relevant information from company documents, databases, and approved knowledge sources.</p><p>🔹 2. MCP — Connect AI to enterprise tools</p><p>Provide standardized access to approved APIs, ticketing systems, and business applications.</p><p>🔹 3. AI Agents — Orchestrate the workflow</p><p>Break the request into steps, select the appropriate tools, and coordinate the execution.</p><p>🔹 4. .NET — Build the enterprise foundation</p><p>Use <a href="http://asp.net/">ASP.NET</a> Core APIs, dependency injection, authentication, authorization, and well-defined service boundaries to support the application.</p><p>🔹 5. Security &amp; Governance — Control what AI can do</p><p>Apply least-privilege access, validate tool inputs, protect sensitive data, and require human approval for high-impact actions.</p><p>🔹 6. Observability &amp; Resilience — Make it production-ready</p><p>Track execution traces, latency, token consumption, failures, and cost. Add timeouts, bounded retries, and appropriate fallback strategies.</p><h3>💡 The architecture lesson</h3><p>An AI agent should never be treated as an unrestricted application user.</p><p>It should operate within clearly defined permissions, business rules, and operational boundaries.</p><p>AI can make decisions about the next step. Your architecture must define which steps it is allowed to take.</p><p>After 14 years in software engineering, one principle still holds true:</p><p>Good architecture isn’t about adopting every new technology.</p><p>It’s about choosing the right technology, managing trade-offs, and delivering measurable business value.</p><p>The future belongs to engineers who can combine traditional software engineering principles with AI-native architecture.</p><p>👇 Question for architects and technical leads:</p><p>If you were designing this solution today, what would you prioritize first: security, agent orchestration, or observability?</p><p>I’d love to hear your approach.</p><p>#DotNet #SolutionArchitecture #SoftwareArchitecture #ArtificialIntelligence #AIAgents #Azure #MCP #RAG #TechnicalLeadership #CloudArchitecture</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d52fb67e4de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Paying API Costs? Here’s What Local AI Decisions Look Like with JEV + Ollama]]></title>
            <link>https://medium.com/@sachinghadi/stop-paying-api-costs-heres-what-local-ai-decisions-look-like-with-jev-ollama-035a89c56f3e?source=rss-82b0e1a6d159------2</link>
            <guid isPermaLink="false">https://medium.com/p/035a89c56f3e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[jevs]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Sachin Ghadi]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 07:33:11 GMT</pubDate>
            <atom:updated>2026-10-04T07:33:11.483Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gyaSv8oNV05ybjB5YFna8g.png" /></figure><p>AI applications have traditionally relied on cloud APIs.</p><p>You send a prompt.</p><p>A remote model processes it.</p><p>You receive a response.</p><p>And every request can add to your API bill.</p><p>But what if your application doesn’t actually need a chatbot-style LLM for every task?</p><p>What if all you need is a fast, structured decision?</p><p>That’s where JEV-style decision models become interesting.</p><p>And with Ollama, decision models can now run locally, opening up an interesting architecture for developers who want lower latency, fewer external API dependencies, and more control over where their data is processed. Ollama added support for Jev-style decision models through its /v1/systemone endpoint in September 2026.</p><p>In this article, we’ll look at what JEV actually is, how it differs from an LLM, how Ollama fits into the picture, and where this combination can make sense.</p><h3>1. First: JEV Is Not a Traditional LLM</h3><p>This distinction is important.</p><p>A traditional LLM is generally designed to generate text.</p><p>For example:</p><blockquote><em>“Write a summary of this customer complaint.”</em></blockquote><p>The model might return several paragraphs.</p><p>JEV takes a different approach.</p><p>It is a decision model.</p><p>Instead of asking it to generate a paragraph, you provide:</p><ul><li>A piece of state</li><li>A set of predefined questions</li><li>Possible choices or scoring criteria</li></ul><p>The model then returns structured decisions.</p><p>For example:</p><pre>State:<br>&quot;My package was supposed to arrive yesterday,<br>but tracking hasn&#39;t updated.&quot;</pre><pre>Question:<br>&quot;What type of issue is this?&quot;</pre><pre>Choices:<br>- Shipping<br>- Billing<br>- Account<br>- Technical</pre><p>The output can be something like:</p><pre>{<br>  &quot;choice&quot;: &quot;Shipping&quot;,<br>  &quot;probability&quot;: 0.94<br>}</pre><p>That’s fundamentally different from asking an LLM to generate an explanation.</p><p>JEV is designed for decisions that software can consume directly.</p><h3>2. Why Does This Matter?</h3><p>Consider a typical AI application.</p><p>You may have an LLM doing something like:</p><pre>User Request<br>     ↓<br>Large Language Model<br>     ↓<br>Generate explanation<br>     ↓<br>Your application parses response<br>     ↓<br>Make decision</pre><p>This works.</p><p>But it can be inefficient if the only thing your application actually needs is:</p><pre>YES / NO</pre><p>or:</p><pre>A / B / C</pre><p>or:</p><pre>Score: 0.82</pre><p>In that situation, generating a long natural-language answer just to extract one decision may be unnecessary.</p><p>A decision model changes the pattern:</p><pre>Input<br>  ↓<br>JEV<br>  ↓<br>Structured Decision<br>  ↓<br>Application</pre><p>The output is designed to be consumed by software.</p><h3>3. The Basic JEV Concept</h3><p>Think of JEV as answering questions about a piece of state.</p><p>For example:</p><pre>State:<br>&quot;Customer says they were charged twice for the same order.&quot;</pre><pre>Questions:</pre><pre>1. Which team should handle this?<br>   - Billing<br>   - Technical<br>   - Account</pre><pre>2. Does the customer explicitly request a refund?<br>   - Yes<br>   - No</pre><pre>3. How urgent is the request?<br>   - Routine<br>   - Soon<br>   - Urgent</pre><p>Instead of generating an essay, the model produces structured answers.</p><p>Conceptually:</p><pre>State<br>                   │<br>                   ▼<br>                  JEV<br>                   │<br>        ┌──────────┼──────────┐<br>        ▼          ▼          ▼<br>      Team       Refund     Urgency<br>        │          │          │<br>     Billing      Yes       Urgent</pre><p>This is much closer to how traditional software makes decisions.</p><h3>4. So Where Does Ollama Come In?</h3><p>Ollama provides the local model runtime.</p><p>Instead of sending every decision request to a remote service, you can run compatible decision models on your own machine.</p><p>The architecture becomes:</p><pre>Your Application<br>                       │<br>                       ▼<br>                    Ollama<br>                       │<br>                       ▼<br>              Decision Model<br>                       │<br>                       ▼<br>             Structured Decision</pre><p>Ollama’s implementation uses the /v1/systemone endpoint for decision models following the Jev/System One API pattern.</p><p>This is the important part:</p><p>Ollama isn’t turning JEV into a normal chatbot.</p><p>It is providing a local runtime for decision-model workloads.</p><h3>5. JEV + Ollama Architecture</h3><p>A practical architecture could look like this:</p><pre>┌──────────────────────┐<br>│        User          │<br>└──────────┬───────────┘<br>           │<br>           ▼<br>┌──────────────────────┐<br>│   Your Application   │<br>│   / Backend / Agent  │<br>└──────────┬───────────┘<br>           │<br>           ▼<br>┌──────────────────────┐<br>│       Ollama         │<br>│   Local Runtime      │<br>└──────────┬───────────┘<br>           │<br>           ▼<br>┌──────────────────────┐<br>│   Decision Model     │<br>│  JEV-compatible API  │<br>└──────────┬───────────┘<br>           │<br>           ▼<br>┌──────────────────────┐<br>│ Structured Decision  │<br>│ Choice / Score / Yes │<br>│ No + probabilities   │<br>└──────────────────────┘</pre><p>The application owns the business logic.</p><p>Ollama handles local inference.</p><p>The decision model produces the structured judgment.</p><h3>6. What Can You Use It For?</h3><p>This is where decision models become particularly interesting.</p><p>You don’t need an LLM for every AI task.</p><p>Consider customer-support routing.</p><p>A ticket arrives:</p><blockquote><em>“I was charged twice and need the extra payment refunded.”</em></blockquote><p>Your application might ask:</p><pre>Which team should handle this?</pre><pre>- Billing<br>- Technical<br>- Account<br>- Other</pre><p>JEV can return:</p><pre>Billing</pre><p>with probabilities associated with the available choices.</p><p>Your backend can then immediately route the ticket.</p><p>No generated paragraph needs to be parsed.</p><h3>7. Example: Ticket Classification</h3><p>Imagine 10,000 support tickets.</p><p>A traditional architecture might be:</p><pre>Ticket<br>  ↓<br>LLM<br>  ↓<br>Generated explanation<br>  ↓<br>Parser<br>  ↓<br>Category</pre><p>A decision-model architecture can be:</p><pre>Ticket<br>  ↓<br>Decision Model<br>  ↓<br>Category + Probability<br>  ↓<br>Router</pre><p>For example:</p><pre>{<br>  &quot;category&quot;: {<br>    &quot;choice&quot;: &quot;billing&quot;,<br>    &quot;probability&quot;: 0.97<br>  }<br>}</pre><p>That’s a much more direct interface for software.</p><h3>8. Example: Moderation</h3><p>Suppose you have an application that needs to decide whether content violates a particular policy.</p><p>Instead of:</p><pre>&quot;Please analyze this content and explain whether<br>it violates our policy.&quot;</pre><p>you can define a decision:</p><pre>Does this content violate the policy?</pre><pre>- Yes<br>- No</pre><p>Then your application gets a structured result.</p><p>That can be used to:</p><pre>Content<br>   ↓<br>Decision Model<br>   ↓<br>Policy Decision<br>   ↓<br>Allow / Review / Block</pre><p>This type of workflow is one of the areas where decision models can be particularly useful.</p><h3>9. Example: AI Agent Guardrails</h3><p>Here’s another interesting use case.</p><p>Imagine an AI agent wants to call a tool:</p><pre>send_email(<br>    to=&quot;customer@example.com&quot;,<br>    subject=&quot;Your account update&quot;<br>)</pre><p>Before executing the tool, your application could ask a decision model:</p><pre>Is this tool call allowed?</pre><pre>- Yes<br>- No</pre><p>The result becomes a lightweight decision gate:</p><pre>Agent<br>  │<br>  ▼<br>Tool Call<br>  │<br>  ▼<br>Decision Model<br>  │<br>  ├── YES ──→ Execute<br>  │<br>  └── NO ───→ Block / Review</pre><p>This is an example of where a decision model can complement an LLM rather than replace it.</p><h3>10. JEV Doesn’t Replace LLMs</h3><p>This is an important point.</p><p>The future isn’t necessarily:</p><blockquote><em>LLMs are going away.</em></blockquote><p>A better way to think about it is:</p><blockquote><em>Use generation when you need generation. Use decisions when you need decisions.</em></blockquote><p>For example:</p><pre>AI Application<br>                    │<br>          ┌─────────┴─────────┐<br>          │                   │<br>          ▼                   ▼<br>        LLM               Decision Model<br>          │                   │<br>          ▼                   ▼<br>    Generate text        Make decisions</pre><p>An LLM might:</p><ul><li>Write an email</li><li>Summarize a document</li><li>Generate code</li><li>Explain a concept</li><li>Hold a conversation</li></ul><p>A decision model might:</p><ul><li>Classify a ticket</li><li>Route a request</li><li>Check a policy</li><li>Select an action</li><li>Score an input</li><li>Approve or reject a step</li></ul><p>The two can work together.</p><h3>11. Why Run Decision Models Locally?</h3><p>Now we get to the original question:</p><p>Can local AI reduce API costs?</p><p>Potentially, yes.</p><p>When inference runs locally through Ollama, you don’t have to send each decision to a remote API.</p><p>Instead:</p><pre>Cloud approach:</pre><pre>Application<br>     ↓<br>Internet<br>     ↓<br>Remote AI API<br>     ↓<br>Decision</pre><p>versus:</p><pre>Local approach:</pre><pre>Application<br>     ↓<br>Ollama<br>     ↓<br>Local Decision Model<br>     ↓<br>Decision</pre><p>Ollama specifically highlights local decision-model inference as a way to avoid additional API costs and reduce latency caused by network travel.</p><h3>12. But “No API Cost” Doesn’t Mean “Free”</h3><p>This distinction matters.</p><p>Running a model locally still has costs.</p><p>You may need:</p><ul><li>A capable CPU</li><li>GPU or Apple Silicon</li><li>RAM</li><li>SSD storage</li><li>Electricity</li><li>Maintenance</li><li>Monitoring</li><li>Infrastructure</li></ul><p>So the equation becomes:</p><pre>Cloud:</pre><pre>API usage<br>+<br>Cloud infrastructure<br></pre><pre>Local:</pre><pre>Hardware<br>+<br>Electricity<br>+<br>Maintenance</pre><p>The economics depend on your workload.</p><p>If you’re making only a few hundred decisions per month, a hosted API may be simpler.</p><p>If you’re processing millions of decisions, local inference can become much more interesting.</p><h3>13. Local Inference Can Also Reduce Latency</h3><p>Every cloud request potentially involves:</p><pre>Application<br>    ↓<br>Network<br>    ↓<br>Cloud infrastructure<br>    ↓<br>Model<br>    ↓<br>Network<br>    ↓<br>Application</pre><p>With local inference:</p><pre>Application<br>    ↓<br>Ollama<br>    ↓<br>Model<br>    ↓<br>Application</pre><p>There is no network round trip to a remote inference service.</p><p>Ollama demonstrated decision-model latency in the tens-of-milliseconds range for some local hardware/model configurations, although actual performance depends heavily on your machine and model.</p><p>That’s important for applications that need rapid decisions.</p><h3>14. The Privacy Advantage</h3><p>Another benefit is data locality.</p><p>Imagine you’re processing:</p><ul><li>Customer tickets</li><li>Internal documents</li><li>Security events</li><li>Proprietary logs</li><li>Agent tool calls</li><li>Business rules</li></ul><p>With a local architecture:</p><pre>Private Data<br>     ↓<br>Your Application<br>     ↓<br>Ollama<br>     ↓<br>Local Model<br>     ↓<br>Decision</pre><p>The data can remain inside your environment.</p><p>However, local inference isn’t automatically secure.</p><p>You still need:</p><ul><li>Authentication</li><li>Access controls</li><li>Network security</li><li>Secure model storage</li><li>Logging policies</li><li>Data-retention controls</li><li>Application security</li></ul><p>Local inference improves control over data flow; it doesn’t eliminate security responsibilities.</p><h3>15. Getting Started with Ollama</h3><p>If you’re experimenting with local decision models, the first step is installing or updating Ollama.</p><p>Then you can work with a compatible decision model.</p><p>For example, Ollama’s current decision-model support includes models such as:</p><pre>ollama pull nimble</pre><p>and experimental models such as:</p><pre>ollama pull tev1:4b</pre><p>Ollama currently documents these as decision models using the /v1/systemone API.</p><p>The exact model you choose should depend on your hardware and evaluation requirements.</p><h3>16. The /v1/systemone Idea</h3><p>The API pattern is particularly interesting.</p><p>Instead of simply sending:</p><pre>&quot;Write something about this ticket.&quot;</pre><p>you send a state and questions.</p><p>Conceptually:</p><pre>{<br>  &quot;model&quot;: &quot;nimble&quot;,<br>  &quot;state&quot;: &quot;Customer says they were charged twice.&quot;,<br>  &quot;questions&quot;: {<br>    &quot;team&quot;: {<br>      &quot;type&quot;: &quot;choice&quot;,<br>      &quot;instructions&quot;: &quot;Which team should handle this?&quot;,<br>      &quot;criteria&quot;: {<br>        &quot;billing&quot;: null,<br>        &quot;technical&quot;: null,<br>        &quot;account&quot;: null<br>      }<br>    }<br>  }<br>}</pre><p>The model can then return a structured decision.</p><p>This makes the output much easier for application code to consume.</p><p>Ollama’s documented implementation uses /v1/systemone for this decision-model interface.</p><h3>17. Why Structured Decisions Matter</h3><p>Traditional LLM output might look like:</p><pre>The customer appears to have a billing issue.<br>They mention being charged twice, so this should<br>probably be routed to the billing team.</pre><p>Now your application has to interpret that response.</p><p>A decision model can instead return something conceptually closer to:</p><pre>{<br>  &quot;team&quot;: &quot;billing&quot;,<br>  &quot;confidence&quot;: 0.97<br>}</pre><p>Now your code knows exactly what to do.</p><p>That’s the fundamental appeal of decision models.</p><h3>18. JEV + Ollama vs Traditional LLM API</h3><p>Minimize image</p><p>Edit image</p><p>Delete image</p><p>The important takeaway is that these aren’t necessarily competing technologies.</p><p>They solve different problems.</p><h3>19. A Hybrid AI Architecture</h3><p>One of the most interesting designs is to combine both.</p><p>For example:</p><pre>User<br>                     │<br>                     ▼<br>                Your App<br>                     │<br>          ┌──────────┴──────────┐<br>          │                     │<br>          ▼                     ▼<br>        LLM              Local Decision Model<br>          │                     │<br>          │                  Ollama<br>          │                     │<br>          ▼                     ▼<br>    Generate text         Make decision</pre><p>Imagine an AI customer-service application.</p><p>The LLM handles:</p><blockquote><em>“Write a helpful response to the customer.”</em></blockquote><p>The decision model handles:</p><blockquote><em>“Which department should receive this ticket?”</em></blockquote><p>This lets you use the right model for the right job.</p><h3>20. What About Cost?</h3><p>Let’s say your application processes a very large number of simple classification requests.</p><p>With a hosted model:</p><pre>Number of requests<br>        ×<br>Provider pricing<br>        =<br>API cost</pre><p>With local inference:</p><pre>Hardware<br>+<br>Electricity<br>+<br>Maintenance<br>=<br>Infrastructure cost</pre><p>If the workload is predictable and high-volume, the economics can become attractive.</p><p>But don’t assume local is automatically cheaper.</p><p>Benchmark it.</p><h3>21. What You Should Measure</h3><p>Before moving a production workload to local inference, measure:</p><h3>1. Latency</h3><p>How quickly does each decision return?</p><h3>2. Throughput</h3><p>How many decisions can your machine process per second?</p><h3>3. Accuracy</h3><p>How often does the model make the correct decision?</p><h3>4. Confidence calibration</h3><p>Are high-confidence decisions actually more reliable?</p><h3>5. Memory usage</h3><p>How much RAM/VRAM does the model require?</p><h3>6. Concurrency</h3><p>What happens when 10, 100, or 1,000 requests arrive together?</p><h3>7. Cost</h3><p>Compare:</p><pre>Cloud API cost<br>vs.<br>Local infrastructure cost</pre><h3>8. Operational complexity</h3><p>How much engineering effort is required to operate the local system?</p><h3>22. The Biggest Mistake to Avoid</h3><p>Don’t take an existing LLM application and blindly replace the LLM with JEV.</p><p>First ask:</p><blockquote><em>What does this part of my application actually need?</em></blockquote><p>If the requirement is:</p><blockquote><em>“Write a detailed explanation.”</em></blockquote><p>Use an LLM.</p><p>If the requirement is:</p><blockquote><em>“Choose one of these five categories.”</em></blockquote><p>A decision model may be a better fit.</p><p>If the requirement is:</p><blockquote><em>“Decide whether this request is allowed.”</em></blockquote><p>A decision model may be a better fit.</p><p>The key isn’t replacing AI with another AI model.</p><p>It’s matching the model architecture to the task.</p><h3>23. Where This Gets Really Interesting</h3><p>Imagine an AI agent with multiple decision points.</p><pre>Agent<br>                      │<br>                      ▼<br>              Should I call a tool?<br>                      │<br>                      ▼<br>                Decision Model<br>                 /          \<br>               YES           NO<br>                │             │<br>                ▼             ▼<br>           Call Tool       Stop<br>                │<br>                ▼<br>          Tool Result<br>                │<br>                ▼<br>        Should I continue?<br>                │<br>                ▼<br>          Decision Model</pre><p>A decision model can act as a lightweight control layer around an LLM-powered agent.</p><p>The LLM can reason and generate.</p><p>The decision model can make bounded judgments.</p><p>Ollama can provide the local inference layer.</p><p>That combination is potentially much more interesting than simply running a chatbot locally.</p><h3>24. Is JEV the Future of AI?</h3><p>It’s too early to make that claim.</p><p>But the underlying idea is important.</p><p>AI doesn’t always need to generate text.</p><p>Sometimes software simply needs an answer to:</p><pre>Which one?</pre><pre>Yes or no?</pre><pre>How urgent?</pre><pre>Is this allowed?</pre><pre>Where should this go?</pre><pre>Which action should happen next?</pre><p>For those problems, a specialized decision model can be a better abstraction than a general-purpose text generator.</p><p>That’s the bigger idea behind JEV-style systems.</p><h3>25. The Future May Be “Multiple Models”</h3><p>Instead of:</p><pre>Everything → One LLM</pre><p>we may increasingly see:</p><pre>Application<br>                       │<br>       ┌───────────────┼────────────────┐<br>       │               │                │<br>       ▼               ▼                ▼<br>      LLM        Decision Model      Vision Model<br>       │               │                │<br>       ▼               ▼                ▼<br>    Generate        Decide           Understand</pre><p>Each model handles the task it’s best suited for.</p><p>That’s a much more interesting architecture than trying to force every AI problem through a single giant model.</p><h3>26. So, Should You Use JEV + Ollama?</h3><p>Consider it if your application has lots of:</p><ul><li>Classification</li><li>Routing</li><li>Policy checks</li><li>Moderation</li><li>Risk scoring</li><li>Tool-call validation</li><li>Agent decisions</li><li>Structured judgments</li></ul><p>It becomes especially interesting when you have:</p><ul><li>High request volume</li><li>Low-latency requirements</li><li>Privacy requirements</li><li>Existing local hardware</li><li>A desire to reduce external API dependency</li></ul><p>You probably shouldn’t use it as a direct replacement for a conversational LLM when your application primarily needs:</p><ul><li>Creative writing</li><li>Long-form generation</li><li>Chat</li><li>Code generation</li><li>Complex natural-language responses</li></ul><h3>27. The Architecture I’d Start With</h3><p>For an AI application that needs both generation and decisions, I’d start with:</p><pre>User<br>                        │<br>                        ▼<br>                 ┌─────────────┐<br>                 │ Application │<br>                 └──────┬──────┘<br>                        │<br>              ┌─────────┴─────────┐<br>              │                   │<br>              ▼                   ▼<br>        Generative LLM       JEV-style<br>                              Decision Model<br>                                  │<br>                                  ▼<br>                               Ollama<br>                                  │<br>                                  ▼<br>                           Local Inference</pre><p>This gives you flexibility.</p><p>You don’t need to make everything local.</p><p>You don’t need to make everything cloud-based.</p><p>You can choose based on the workload.</p><h3>28. Final Takeaway</h3><p>The interesting part of JEV + Ollama isn’t simply:</p><blockquote><em>“Run AI locally and stop paying API costs.”</em></blockquote><p>The more important idea is:</p><blockquote><em>Use specialized models for specialized tasks.</em></blockquote><p>JEV-style decision models are designed to make structured decisions rather than generate long-form text.</p><p>Ollama provides a way to run compatible decision models locally.</p><p>Together, they open up a different approach to building AI systems:</p><pre>AI Application<br>                         │<br>            ┌────────────┴────────────┐<br>            │                         │<br>            ▼                         ▼<br>       Generative AI           Decision AI<br>            │                         │<br>            ▼                         ▼<br>        Text / Code            Choice / Score<br>                                  / Yes-No<br>            │                         │<br>            └────────────┬────────────┘<br>                         ▼<br>                    Your Software</pre><p>And that may be the bigger shift:</p><p>AI doesn’t always need to generate something.</p><p>Sometimes it just needs to make the right decision.</p><p>And when that decision can run locally, quickly, and in a structured format, developers get another powerful building block for modern AI applications.</p><h3>Try It Yourself</h3><p>If you’re experimenting with local AI, start with a simple decision problem.</p><p>For example:</p><pre>Input:<br>&quot;My card was charged twice for the same order.&quot;</pre><pre>Question:<br>Which team should handle this?</pre><pre>Options:<br>- Billing<br>- Technical<br>- Account<br>- Other</pre><p>Run the same workload through:</p><ol><li>A traditional LLM API</li><li>A JEV-style decision model</li><li>A local decision model through Ollama</li></ol><p>Then compare:</p><ul><li>Accuracy</li><li>Latency</li><li>Output format</li><li>Hardware usage</li><li>API cost</li><li>Operational complexity</li></ul><p>Don’t guess which architecture is better. Measure it.</p><p>That’s where the real engineering insight begins.</p><h3>What do you think?</h3><p>Would you use a local decision model for your AI application?</p><p>Or would you rather keep everything behind a managed cloud API?</p><p>Maybe the future isn’t LLM vs. local AI.</p><p>Maybe it’s:</p><p>“Use the right model for the right decision.”</p><p>#AI #JEV #Ollama #LocalAI #DecisionModels #LLM #GenerativeAI #AIEngineering #MachineLearning #ArtificialIntelligence #Developers #SoftwareEngineering #OpenSourceAI</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=035a89c56f3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>