<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Md. Saddam Hossain</title>
    <description>The latest articles on DEV Community by Md. Saddam Hossain (@saddamhossaindotnet).</description>
    <link>https://dev.to/saddamhossaindotnet</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F524096%2Fce19f62b-ed5b-452e-a73d-d67e7dc8424a.jpg</url>
      <title>DEV Community: Md. Saddam Hossain</title>
      <link>https://dev.to/saddamhossaindotnet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saddamhossaindotnet"/>
    <language>en</language>
    <item>
      <title>𝐌𝐲 𝐍𝐨𝐧-𝐍𝐞𝐠𝐨𝐭𝐢𝐚𝐛𝐥𝐞 𝐒𝐭𝐚𝐧𝐝𝐚𝐫𝐝 𝐓𝐞𝐦𝐩𝐥𝐚𝐭𝐞 𝐟𝐨𝐫 𝐄𝐯𝐞𝐫𝐲 .𝐍𝐄𝐓 𝐖𝐞𝐛 𝐀𝐏𝐈 𝐏𝐫𝐨𝐣𝐞𝐜𝐭</title>
      <dc:creator>Md. Saddam Hossain</dc:creator>
      <pubDate>Wed, 25 Feb 2026 07:04:55 +0000</pubDate>
      <link>https://dev.to/saddamhossaindotnet/--16ff</link>
      <guid>https://dev.to/saddamhossaindotnet/--16ff</guid>
      <description>&lt;p&gt;𝐌𝐲 𝐍𝐨𝐧-𝐍𝐞𝐠𝐨𝐭𝐢𝐚𝐛𝐥𝐞 𝐒𝐭𝐚𝐧𝐝𝐚𝐫𝐝 𝐓𝐞𝐦𝐩𝐥𝐚𝐭𝐞 𝐟𝐨𝐫 𝐄𝐯𝐞𝐫𝐲 .𝐍𝐄𝐓 𝐖𝐞𝐛 𝐀𝐏𝐈 𝐏𝐫𝐨𝐣𝐞𝐜𝐭&lt;/p&gt;

&lt;p&gt;Over the years, I've learned one critical lesson: The long-term success of a .NET project is decided in the first few days.&lt;/p&gt;

&lt;p&gt;When I start a new Web API project, I don't begin with features. I begin with architecture, discipline, resilience, observability, and quality enforcement.&lt;/p&gt;

&lt;p&gt;This is the exact template I use for every project — freelance, SaaS, or enterprise. This is not optional. 𝐓𝐡𝐢𝐬 𝐢𝐬 𝐦𝐲 𝐛𝐚𝐬𝐞𝐥𝐢𝐧𝐞 𝐬𝐭𝐚𝐧𝐝𝐚𝐫𝐝.&lt;/p&gt;

&lt;p&gt;Here's what every project gets from Day 1:&lt;/p&gt;

&lt;p&gt;𝐅𝐨𝐮𝐧𝐝𝐚𝐭𝐢𝐨𝐧 &amp;amp; 𝐁𝐮𝐢𝐥𝐝 𝐃𝐢𝐬𝐜𝐢𝐩𝐥𝐢𝐧𝐞&lt;br&gt;
• Enterprise-grade Directory.Build.props with centralized configuration&lt;br&gt;
• .NET 10 with latest C# features&lt;br&gt;
• Nullable reference types enforced&lt;br&gt;
• Warnings treated as errors&lt;br&gt;
• Code analyzers: SonarAnalyzer, Meziantou, Roslynator&lt;/p&gt;

&lt;p&gt;𝐂𝐨𝐝𝐞 𝐐𝐮𝐚𝐥𝐢𝐭𝐲 &amp;amp; 𝐂𝐨𝐧𝐬𝐢𝐬𝐭𝐞𝐧𝐜𝐲&lt;br&gt;
• .editorconfig with strict formatting rules&lt;br&gt;
• Enforced via dotnet format in CI/CD&lt;br&gt;
• Centralized dependency management (Directory.Packages.props)&lt;br&gt;
• Global using statements for cleaner code&lt;/p&gt;

&lt;p&gt;𝐀𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞 &amp;amp; 𝐃𝐞𝐬𝐢𝐠𝐧&lt;br&gt;
• Clean/Layered/Vertical Slice Architecture (context-dependent)&lt;br&gt;
• Architecture tests to prevent erosion&lt;br&gt;
• FluentValidation for centralized validation&lt;br&gt;
• Custom guard clauses for domain integrity&lt;br&gt;
• Fluent API for EF Core configurations&lt;/p&gt;

&lt;p&gt;𝐒𝐞𝐜𝐮𝐫𝐢𝐭𝐲 &amp;amp; 𝐂𝐨𝐦𝐩𝐥𝐢𝐚𝐧𝐜𝐞&lt;br&gt;
• ASP.NET Core Identity with role &amp;amp; permission management&lt;br&gt;
• JWT-based authentication&lt;br&gt;
• EF Core interceptors for audit trails (CreatedBy, UpdatedBy, timestamps)&lt;br&gt;
• Secure audit logging for regulatory compliance&lt;/p&gt;

&lt;p&gt;𝐑𝐞𝐬𝐢𝐥𝐢𝐞𝐧𝐜𝐞 &amp;amp; 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞&lt;br&gt;
• API rate limiting&lt;br&gt;
• Retry policies with exponential backoff&lt;br&gt;
• Timeout policies for external dependencies&lt;br&gt;
• Hybrid caching (in-memory + distributed)&lt;br&gt;
• Manual mapping for performance and clarity&lt;/p&gt;

&lt;p&gt;𝐎𝐛𝐬𝐞𝐫𝐯𝐚𝐛𝐢𝐥𝐢𝐭𝐲 &amp;amp; 𝐌𝐨𝐧𝐢𝐭𝐨𝐫𝐢𝐧𝐠&lt;br&gt;
• Structured logging with Serilog&lt;br&gt;
• OpenTelemetry for distributed tracing&lt;br&gt;
• Correlation IDs for request tracking&lt;br&gt;
• Health checks (liveness, readiness, database validation)&lt;/p&gt;

&lt;p&gt;𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐨𝐧 &amp;amp; 𝐓𝐞𝐬𝐭𝐢𝐧𝐠&lt;br&gt;
• xUnit + NSubstitute + FluentAssertions&lt;br&gt;
• Architecture enforcement tests&lt;br&gt;
• GitHub Actions CI/CD pipeline&lt;br&gt;
• Automated build, test, formatting, and deployment&lt;/p&gt;

&lt;p&gt;This is not over-engineering. This is engineering done correctly from Day 1.&lt;/p&gt;

&lt;p&gt;Professional software must be: Structured. Secure. Resilient. Observable. Automated. Testable. Maintainable.&lt;/p&gt;

&lt;p&gt;If the build is clean, the system is stable.&lt;br&gt;
If CI fails, deployment stops.&lt;br&gt;
Without telemetry, production debugging is blind.&lt;/p&gt;

&lt;p&gt;This is my standard baseline for building scalable, production-ready .NET systems.&lt;/p&gt;

&lt;p&gt;📖 Full detailed breakdown: &lt;a href="https://saddamhossain.net/blog/my-standard-template-for-dotnet-web-api-project" rel="noopener noreferrer"&gt;https://saddamhossain.net/blog/my-standard-template-for-dotnet-web-api-project&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What are your non-negotiable standards when starting a new project?&lt;/p&gt;

&lt;h1&gt;
  
  
  dotnet #webapi #softwarearchitecture #cleancode #engineering #bestpractices #saddamhossaindotnet
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>𝗛𝗼𝘄 𝗩𝗮𝗹𝘂𝗲 𝗧𝘆𝗽𝗲𝘀 𝗮𝗻𝗱 𝗥𝗲𝗳𝗲𝗿𝗲𝗻𝗰𝗲 𝗧𝘆𝗽𝗲𝘀 𝗪𝗼𝗿𝗸 𝗶𝗻 𝗖#?</title>
      <dc:creator>Md. Saddam Hossain</dc:creator>
      <pubDate>Wed, 30 Oct 2024 04:44:19 +0000</pubDate>
      <link>https://dev.to/saddamhossaindotnet/-5fm5</link>
      <guid>https://dev.to/saddamhossaindotnet/-5fm5</guid>
      <description>&lt;p&gt;In a creative agency, two team leads, Sam and Taylor, each had a unique way of handling design drafts.&lt;/p&gt;

&lt;p&gt;Sam liked to print a fresh copy of every draft for each team member. This way, everyone had their own personal copy to make notes and edits on. Whatever they changed didn’t affect Sam’s original draft—it was safe and unchanged.&lt;/p&gt;

&lt;p&gt;Taylor, however, preferred using a shared cloud document. Instead of giving everyone their own copy, Taylor shared a single, live document with the team. Anyone could jump in, make updates, and everyone would see the changes right away. This allowed for real-time collaboration, but it also meant that any edit affected the whole team’s view.&lt;/p&gt;

&lt;p&gt;In C#, 𝗦𝗮𝗺’𝘀 𝗺𝗲𝘁𝗵𝗼𝗱 𝗶𝘀 𝗹𝗶𝗸𝗲 𝘃𝗮𝗹𝘂𝗲 𝘁𝘆𝗽𝗲𝘀 —each person gets a separate copy that doesn’t affect the original. 𝗧𝗮𝘆𝗹𝗼𝗿’𝘀 𝗺𝗲𝘁𝗵𝗼𝗱 𝗶𝘀 𝗹𝗶𝗸𝗲 𝗿𝗲𝗳𝗲𝗿𝗲𝗻𝗰𝗲 𝘁𝘆𝗽𝗲𝘀—everyone works on the same document, so updates are shared by all.&lt;/p&gt;

&lt;p&gt;𝗞𝗲𝘆 𝘁𝗮𝗸𝗲𝗮𝘄𝗮𝘆: &lt;br&gt;
Understanding value types and reference types in C# is like choosing between Sam’s independent copies or Taylor’s shared file. Value types are best for independent data, while reference types are ideal for shared, editable data.&lt;/p&gt;

&lt;p&gt;For a deeper dive into these concepts, check out my blog post: &lt;a href="https://saddamhossain.net/blog/understanding-value-types-and-refence-types" rel="noopener noreferrer"&gt;https://saddamhossain.net/blog/understanding-value-types-and-refence-types&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  oop #dotnet #csharp #valuetype #referencetype #saddamhossaindotnet
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗘𝗻𝗰𝗮𝗽𝘀𝘂𝗹𝗮𝘁𝗶𝗼𝗻: 𝗧𝗵𝗲 𝗣𝗼𝘄𝗲𝗿 𝗼𝗳 𝗗𝗮𝘁𝗮 𝗛𝗶𝗱𝗶𝗻𝗴 𝗶𝗻 𝗢𝗢𝗣</title>
      <dc:creator>Md. Saddam Hossain</dc:creator>
      <pubDate>Tue, 29 Oct 2024 06:22:47 +0000</pubDate>
      <link>https://dev.to/saddamhossaindotnet/-b43</link>
      <guid>https://dev.to/saddamhossaindotnet/-b43</guid>
      <description>&lt;p&gt;Imagine you’re at a restaurant. When you place an order, you don’t need to know how the chef prepares your meal, what ingredients they use, or the cooking process. You simply trust that the restaurant will serve you a delicious dish. This scenario beautifully illustrates the principle of encapsulation in Object-Oriented Programming (OOP).&lt;/p&gt;

&lt;p&gt;Encapsulation is like the restaurant’s approach to customer service. It combines data (like the ingredients and cooking techniques) and methods (the steps to prepare a dish) into a single unit (the kitchen). Just as you interact with the restaurant through a menu and a waiter, in OOP, you interact with an object through defined methods, without needing to access its internal data directly.&lt;/p&gt;

&lt;p&gt;Let’s consider a practical example: a bank account. The account itself contains sensitive information like the balance and transaction history. In a well-encapsulated system, you wouldn’t have direct access to view or modify this information. Instead, you interact with it through specific methods like deposit() and withdraw(). These methods are like the waiter taking your order; they handle the details behind the scenes, ensuring that all transactions are processed correctly and securely.&lt;/p&gt;

&lt;p&gt;By hiding the inner workings of an object, encapsulation helps prevent unwanted changes and errors, much like a restaurant keeps its kitchen operations private to ensure quality and safety. This separation of interface and implementation not only protects the data but also makes your code more maintainable and easier to work with. Developers can change the internal workings of a class without affecting other parts of the application, just as a restaurant can update its recipes without altering how customers place their orders.&lt;/p&gt;

&lt;p&gt;𝗞𝗲𝘆 𝘁𝗮𝗸𝗲𝗮𝘄𝗮𝘆: Encapsulation safeguards data and simplifies interactions, making it essential for creating reliable and user-friendly applications.  Data should be hidden; if needed, it can be opened selectively.&lt;/p&gt;

&lt;p&gt;To see a simple code example, check out my blog post: &lt;a href="https://saddamhossain.net/blog/understanding-encapsulation" rel="noopener noreferrer"&gt;https://saddamhossain.net/blog/understanding-encapsulation&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  oop #dotnet #csharp #encapsulation #datahide #saddamhossaindotnet
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗖𝗹𝗮𝘀𝘀𝗲𝘀 𝗮𝗻𝗱 𝗢𝗯𝗷𝗲𝗰𝘁𝘀 𝗶𝗻 𝗖#: 𝗧𝗵𝗲 𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗕𝗹𝗼𝗰𝗸𝘀 𝗼𝗳 𝗢𝗢𝗣</title>
      <dc:creator>Md. Saddam Hossain</dc:creator>
      <pubDate>Mon, 28 Oct 2024 06:21:17 +0000</pubDate>
      <link>https://dev.to/saddamhossaindotnet/-3o5f</link>
      <guid>https://dev.to/saddamhossaindotnet/-3o5f</guid>
      <description>&lt;p&gt;𝐈𝐦𝐚𝐠𝐢𝐧𝐞 𝐭𝐡𝐢𝐬: You’ve just been hired to organize a massive, disorganized library. Thousands of books are scattered everywhere, and it’s your job to bring order to the collection. Instead of arranging books one by one, you come up with a brilliant idea: let’s create a system where each type of book—whether Fiction, Biography, or Science—has its own set of rules and a designated place.&lt;/p&gt;

&lt;p&gt;In C#, this is like setting up classes. Think of a class as the blueprint for each book category, defining what kind of information each book will contain. Fiction books might need a plot description and genre, while Biography books would include a person's name and life achievements. These blueprints don’t create the books themselves but lay the groundwork for organizing them.&lt;/p&gt;

&lt;p&gt;Now, let’s say you start placing individual books onto the shelves. Each book follows the layout defined by its category but has unique details—its title, author, and even little annotations. These individual books represent objects in C#. An object is a specific instance of a class, bringing a unique set of data to life within a defined structure.&lt;/p&gt;

&lt;p&gt;𝗪𝗵𝘆 𝗢𝗿𝗴𝗮𝗻𝗶𝘇𝗶𝗻𝗴 𝗟𝗶𝗸𝗲 𝗧𝗵𝗶𝘀 𝗠𝗮𝘁𝘁𝗲𝗿𝘀 📚&lt;br&gt;
By defining these categories (or classes) and placing unique books within them (or objects), you’ve created an efficient system. In C#, this concept is central to Object-Oriented Programming, allowing developers to structure complex systems in manageable ways. Just as our library can now expand by adding more books to existing categories or introducing new ones, well-organized classes in a program allow for easy growth and flexibility.&lt;br&gt;
Curious to dig deeper into how classes and objects work in C#? &lt;/p&gt;

&lt;p&gt;I’ve broken it down in more detail in my latest article: &lt;a href="https://saddamhossain.net/blog/understanding-classes-objects" rel="noopener noreferrer"&gt;https://saddamhossain.net/blog/understanding-classes-objects&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Production Ready EF Core CRUD in Layer Architecture</title>
      <dc:creator>Md. Saddam Hossain</dc:creator>
      <pubDate>Thu, 07 Mar 2024 06:33:05 +0000</pubDate>
      <link>https://dev.to/saddamhossaindotnet/--262i</link>
      <guid>https://dev.to/saddamhossaindotnet/--262i</guid>
      <description>&lt;p&gt;𝐂𝐨𝐧𝐟𝐢𝐝𝐞𝐧𝐭𝐥𝐲 𝐁𝐮𝐢𝐥𝐝 𝐏𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧-𝐑𝐞𝐚𝐝𝐲 𝐂𝐑𝐔𝐃 𝐰𝐢𝐭𝐡 𝐄𝐅 𝐂𝐨𝐫𝐞 𝐢𝐧 𝐍-𝐋𝐚𝐲𝐞𝐫 𝐀𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpav5vp36rn2606yu72hy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpav5vp36rn2606yu72hy.png" alt=" " width="800" height="737"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I believe the project is suitable for beginners to advanced levels who want to develop an ASP.NET Core Web API project with N-Layer architecture.&lt;/p&gt;

&lt;p&gt;Controllers are very thin, resulting in a neat and clean appearance. API versioning with CORS is implemented. Balancing Cross-Cutting Concerns in the project has been achieved. The Global Error Handling middleware has been implemented nicely. Logging Source Generator for High-Performance Logging and Structured Logging in ASP.NET Core With Serilog has been implemented. In the API layer, caching has been introduced. You can use Ardalis Guard Clauses or ErrorOr, but in these projects, I implement custom guard clauses that are fully customizable. Dependency injection is utilized throughout. Health checks are integrated so we can check the health condition of the project. The project also includes an audit trail. Here, we have EF Core code-first migration.&lt;/p&gt;

&lt;p&gt;We have robust Architecture tests for the full N-Layer architecture and unit tests. Unit tests cover 100% test coverage, including the controller and service layers. You can learn how to write architecture and unit tests effectively by examining the project. I have written over 80 unit tests, which may seem extensive, but it's because of the approach I take, which makes learning and understanding easy.&lt;/p&gt;

&lt;p&gt;With the introduction of MsBuild, we now have the capability to manage all property settings and more within a single file, which can be placed in the root directory of our solution alongside our solution file. This file (Directory.Build.props) will automatically apply to all projects defined in the solution.&lt;/p&gt;

&lt;p&gt;Dependency management is a fundamental aspect of NuGet. While managing dependencies for a single project may be straightforward, it becomes increasingly challenging as multi-project solutions grow in size and complexity. In scenarios where common dependencies are shared across numerous projects, leveraging NuGet's centralized package management features allows for streamlined management from a single location. I achieve this through a centralized NuGet package system using Directory.Packages.props.&lt;/p&gt;

&lt;p&gt;Here is the link to see more details about the project: &lt;a href="https://saddamhossain.net/essentials-collection" rel="noopener noreferrer"&gt;https://saddamhossain.net/essentials-collection&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Personal Website</title>
      <dc:creator>Md. Saddam Hossain</dc:creator>
      <pubDate>Wed, 02 Dec 2020 06:35:02 +0000</pubDate>
      <link>https://dev.to/saddamhossaindotnet/my-portfolio-website-og3</link>
      <guid>https://dev.to/saddamhossaindotnet/my-portfolio-website-og3</guid>
      <description>&lt;p&gt;Hello there! 👋&lt;br&gt;
I am Md. Saddam Hossain, an experienced software architect, and developer with extensive expertise in developing enterprise-grade software solutions using Microsoft technologies. To learn more, please visit: &lt;a href="https://saddamhossain.net/" rel="noopener noreferrer"&gt;https://saddamhossain.net/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
