From Flask to Blazor: My Leap into the .NET World
Don’t get me wrong — I love Flask. But its flexibility sometimes makes it difficult to find the “right” way of doing things. Being open source, there are often five different answers to the same problem online — many of which are outdated or incompatible with the specific version or structure you’re using. This meant that trying to implement certain features (especially database migrations) often sent me down endless rabbit holes. Again, and again.
One particular migration issue ended up becoming a full-blown debugging marathon. Hours of intense researching and experimenting later — having dragged in both my dad and even a family friend (who just came over for tea!) we had cracked it. And just as we were about to celebrate… the database connection failed. Azure Data Studio completely lost connection.
That’s when my dad (who’s been working with .NET for years) suggested that maybe I try switching frameworks — and languages — entirely. After some research into ASP.NET and Blazor, I realized this might actually be the structure and consistency I’ve been missing.
So, I jumped into learning Blazor. Here's how I approached it:
My Journey Into Blazor
Toutorial 1: Build Your First Blazor App
I started with Microsoft Learn’s Build Your First Blazor App tutorial. It walks you through everything from installation to running your first app in VS Code — even if you’re unfamiliar with C# or .NET tooling.
This tutorial introduced me to the concept of components in Blazor. Instead of relying on JavaScript for interactivity, Blazor lets you use C#. I also learned how to create and modify components, which gave me a good sense of how the framework is structured.
If you already have some web dev experience, you can skim through this — but it’s a good intro to how Blazor apps are built.
Toutorial 2: Build a Todo List App
This next tutorial gave me a better understanding of event handling, data binding, and routing in Blazor. Even if you're new to C#, the tutorial provides most of the code while helping you understand why each part exists.
By the end, I was a lot more comfortable with how components communicate, how user input flows through a Blazor app and other fundamental concepts.
Toutorial: Build a Movie Database App
This is definitely a MUST as it thoroughly covers a lot of ground, focusing on each and every aspect individually without assuming you know it. Some notable topics covered were:
-
Creating and managing a database with EF Core (the moment migrations were demystified 😅)
-
Implementing CRUD operations
-
Adding form validation
-
Creating a search bar
-
Understanding ALL the files and folders in a Blazor Web App project
What I loved most was that it didn’t just throw code at me. It explained why certain design choices were made and what different tools are best used for — teaching me to think like a real developer, not just a coder.
Rebuilding My App in Blazor
With these tutorials under my belt, I began rebuilding my original Flask app using Blazor. It’s not completely finished yet, but I’m genuinely happy I made the switch. Blazor has helped me think more like a production-oriented developer. Instead of figuring everything out from scratch, .NET gives you a clear structure and well-documented path forward.
I also found that even without any C# background, I was able to pick things up quickly. The documentation is great, and my dad even introduced me to a podcast called .NET Rocks! that has made this venture even more fun.
But also I think its worth mentioning: even though the migration issue with Flask took a long time, I’m really glad it happened. If I had just found the solution quickly, I wouldn’t have learned nearly as much. That deep dive taught me a huge amount about migrations, dependencies, and debugging — lessons I now carry with me into any framework I use.