Clean Architecture w/ Blazor ๐Ÿ”ฅ, Blazor in the Industry ๐Ÿš€, .NET Web Academy Enrollment Closing Soon ๐ŸŽ“


Hey Reader,

Today, we're diving into two burning questions that have been on a lot of your minds: How to implement Clean Architecture in a Blazor Web App and whether Blazor is viable in the industry.

๐Ÿ”ฅ Implementing Clean Architecture with Blazor on YouTube

In my newest video tutorial, I break down the essentials of setting up a Clean Architecture for your Blazor Web App in Visual Studio. We'll explore the four layers - Domain, Application, Infrastructure, and Presentation - and how they seamlessly integrate.

video previewโ€‹

๐Ÿ’ป Prefer Reading? Here's the Essence

Here's what you need to know:

Start with a blank solution in Visual Studio and create a "src" folder for all your projects.

Begin layering by setting up three class library projects: "Domain," "Application," "Infrastructure". For the Presentation layer, kick off a new project with the "Blazor Web App" template, which will then be the starting project.

With Clean Architecture, each layer points inwards to ensure separation of concerns. A common industry practice allows the presentation layer to directly reference the infrastructure layer.

Ensure proper project referencing: Application refers to Domain, Infrastructure to Application, and Presentation to Infrastructure (taking the shortcut here).

For service registration, don't bunch it all in the Presentation layer's Program.cs. Add a DependencyInjection.cs file in both Application and Infrastructure layers with an extension method for the IServiceCollection. Invoke this in the Presentation layer's Program.cs.

That's it!

๐Ÿš€ Blazor in the Real World: BurnRate's Growth Journey

A lot of you have been asking if people really use Blazor for real work.

The story of BurnRate, run by .NET expert Robert McLaws, shows that yes, they do.

Instead of using complicated Excel sheets, BurnRate uses a smart "People Algorithm" with the help of Blazor and ASP.NET. This makes their website able to handle detailed financial stuff easily.

It's a great example of how Blazor is good for making reliable, ready-for-business apps. Check out how BurnRate uses Blazor here: BurnRate is fueling revenue success with Blazor.

๐Ÿ“š .NET Web Academy Enrollment Closing Soon

Thank you immensely for your enthusiasm and support for the .NET Web Academy. Just a friendly reminder, enrollment is open for just one more week. Secure your place now at https://learn.dotnetwebacademy.com.


Have questions or need clarifications? Don't hesitate to hit reply to this email. I'm here to support with more tutorials if needed.

A big thank you to our incredible community and my Patrons for your steadfast support. You're the backbone of this newsletter and my channel. Stay safe, and remember, joy is found in coding! ๐Ÿ’ป

Take care,

Patrick


Patrick God

Become a .NET & Blazor expert with weekly tutorials featuring best practices and the latest improvements, right in your inbox.

Read more from Patrick God
video preview

Hey Reader, You sit down to build an API, add some authentication, and think, โ€œJWT should do the trick.โ€ But then you wonder: What happens if my JWT gets stolen? How do I keep users logged in without compromising security? Sound familiar? In my latest video, I show you how to implement secure JWT authentication with short-lived tokens and refresh tokens in .NET. This setup minimizes risk while keeping the user experience seamless. No fluff - just practical, real-world guidance for building...

Hey Reader, Tired of factories and messy if-else logic in your projects? Since .NET 8, Keyed Services make it easy to handle multiple implementations. No more clutter - just clean, scalable code. In my new video, youโ€™ll see how to dynamically pick services using a key and write code thatโ€™s easy to extend. Itโ€™s a fresh, modern approach to dependency injection thatโ€™ll have you rethinking how you design your APIs. ๐Ÿ‘‰ Watch the video here Wishing you a fantastic start to the new year filled with...

video preview

Hey Reader, You sit down to write an API, and before you know it, youโ€™re knee-deep in controllers, attributes, and boilerplate. Sound familiar? What if you could skip all that and still build a fully functional API - fast? Thatโ€™s where Minimal APIs in .NET come in. Theyโ€™re clean and lightweight and make building APIs feel like a breeze. In my latest video, I show you how to set up endpoints step by step and structure everything neatly so your code stays easy to read and scale. No fluff - just...