<?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: Mateus Rodrigues</title>
    <description>The latest articles on DEV Community by Mateus Rodrigues (@mrodriguesweb).</description>
    <link>https://dev.to/mrodriguesweb</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%2F1776806%2F9e70af80-62c8-4941-b4ca-80bbd7b13976.jpg</url>
      <title>DEV Community: Mateus Rodrigues</title>
      <link>https://dev.to/mrodriguesweb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrodriguesweb"/>
    <language>en</language>
    <item>
      <title>What I Learned Building My First Clean Architecture Project in .NET</title>
      <dc:creator>Mateus Rodrigues</dc:creator>
      <pubDate>Thu, 22 Jan 2026 23:40:13 +0000</pubDate>
      <link>https://dev.to/mrodriguesweb/what-i-learned-building-my-first-clean-architecture-project-in-net-4mff</link>
      <guid>https://dev.to/mrodriguesweb/what-i-learned-building-my-first-clean-architecture-project-in-net-4mff</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;I spent one month learning Clean Architecture (book + practice), built a small .NET project, and realized the biggest improvement is not “more folders”—it’s clearer boundaries and dependency direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;Hi! I’m a .NET developer (currently between junior and mid-level) working in the banking sector.&lt;br&gt;
My team builds internal web systems (demand tracking, timesheets, dashboards).&lt;/p&gt;

&lt;p&gt;This post is a short case study: what changed in my thinking after studying Clean Architecture and shipping a small project to GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  My goal (one month)
&lt;/h2&gt;

&lt;p&gt;I set a simple goal: learn Clean Architecture well enough to explain it and apply it.&lt;/p&gt;

&lt;p&gt;My plan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read &lt;em&gt;Clean Architecture&lt;/em&gt; by Robert C. Martin (Uncle Bob).&lt;/li&gt;
&lt;li&gt;Build a small project to validate the ideas.&lt;/li&gt;
&lt;li&gt;Document what I learned and what I would do differently next time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where I was coming from (MVC + “services” folders)
&lt;/h2&gt;

&lt;p&gt;In my ASP.NET MVC projects, I used folders like Controllers, Views, and Services.&lt;br&gt;
Inside “Services”, I often ended up with “query services”, “command services”, “access services”, and orchestration services.&lt;/p&gt;

&lt;p&gt;It worked for small systems, but as projects grew, I noticed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI-driven design: business logic started depending on MVC and ViewModels.&lt;/li&gt;
&lt;li&gt;Blurry boundaries: “Services” became a catch-all.&lt;/li&gt;
&lt;li&gt;High coupling: UI changes often impacted core logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Clean Architecture changed for me
&lt;/h2&gt;

&lt;p&gt;The big shift was thinking in terms of boundaries and dependency direction.&lt;/p&gt;

&lt;p&gt;In my project, I separated responsibilities into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Domain&lt;/strong&gt;: entities and business rules (the core).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application&lt;/strong&gt;: use cases, DTOs, and interfaces (ports).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure&lt;/strong&gt;: implementations (EF Core/Dapper, database access, external services).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web&lt;/strong&gt;: ASP.NET Core MVC (controllers, views, UI models, assets).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key idea I internalized:&lt;br&gt;
If tomorrow I need a different delivery mechanism (REST API, background worker, CLI), the core logic should remain the same.&lt;/p&gt;

&lt;p&gt;Also, it helped me treat infrastructure as a tool.&lt;br&gt;
EF Core is useful—but it shouldn’t dictate the domain model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The project (WIP)
&lt;/h2&gt;

&lt;p&gt;Repository: *&lt;strong&gt;&lt;em&gt;&lt;a href="https://github.com/mrodriguesweb/INVEST.Web" rel="noopener noreferrer"&gt;https://github.com/mrodriguesweb/INVEST.Web&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;*&lt;/p&gt;

&lt;p&gt;It’s an investment tracker (work in progress) built with ASP.NET Core MVC + EF Core, applying Clean Architecture and DDD-style aggregates (e.g., tickers/stocks as aggregates).&lt;br&gt;
The focus is maintainability, testability, and separation of concerns.&lt;/p&gt;

&lt;p&gt;I also started experimenting with Docker to run the app + database + migrations/seed with a single command (still evolving).&lt;/p&gt;

&lt;h2&gt;
  
  
  Key lessons (so far)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Clean Architecture is not about “more layers”. It’s about clear boundaries and explicit dependencies.&lt;/li&gt;
&lt;li&gt;Organizing around use cases is easier to evolve than organizing around framework concepts.&lt;/li&gt;
&lt;li&gt;Keeping UI concerns out of the core improves reuse and testability.&lt;/li&gt;
&lt;li&gt;A monolith can be fine—what hurts is an unstructured monolith with unclear boundaries.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s next
&lt;/h2&gt;

&lt;p&gt;My next focus areas are cloud (Azure), microservices, and messaging—topics that frequently appear in interviews for remote backend roles.&lt;/p&gt;

&lt;p&gt;If you have feedback on my structure or trade-offs, I’d love to hear it.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>architecture</category>
      <category>cleanarchitecture</category>
      <category>csharp</category>
    </item>
  </channel>
</rss>
