Shawn

Shawn Wildermuth

The Blog

My Rants and Raves about technology, programming, everything else...


Using FluentValidation in ASP.NET Core

https://fluentvalidation.net/I'm working on an example to explore some more complex modeling in EF (for SQL and NoSQL) but that's not ready so I thought I'd use it as a bed for some Validation testing I'm doing. The result is some exploration of the FluentValidation project that I haven't had time to dig into until now.

Validation is an interesting exercise in ASP.NET (Core) and trying to get it correct is quite difficult. Ultimately in this day of SPAs and mobile apps, we need a solution that handles the client and the server. If you don't validate on the server it just doesn't matter.

FluentValidation is a replacment for the existing validation attributes (DataAnnotations) that you might already be using. The idea is to separate the validation from the classes. To be clear, this doesn't replace setting up your Entity Framework types with Fluent API this is about server-side validation only. Think of it as a clearer way to define rules for validation of your models or DTOs.

Read...


Upgrading from Gulp 3 to 4

Gulp LogoI may be very late to the party, but once Gulp 3.x stopped working with recent versions of Node, I've been forced to update my projects to the newest version of Gulp.

I was hesitant to learn it as I often think of Gulp as just a side-line tool that I use for production. Luckily for me, the new Gulp is actually simpler and more intuitive. I wanted to write a quick blog post explaining how I converted them.

Let's start with my Gulp 3 version:

Read...


My Vuex Talk from Connect.Tech

Connect.Tech conference I was delighted to spend some time today at Connect.Tech conference. Great web conference and it was packed. So many excited people who wanted to talk about web technologies!

I saw some great talks before mine. I tried to convince the audience that Vuex would simplify not complicate their Vue projects. Hopefully I succeeded.

As promised, I wanted to share my slide and code.

Read...


my dotNetConf 2019 Talk

.NET ConfI had the opportunity to talk on the .NET Conf last week. Was fun to talk about .NET API Versioning. I love how much easier it is, these days, to be able to implement routing than it used to.

They finally posted the video, so if you want to see the talk, here is your chance:

As promised, here are links to the code and slides from the talk:

Read...


Hello World Film: From the Cutting Room Floor #1

Hello World Film Unless you you haven't been paying attention to me or my blog the last three years, you know that I've been working on a film. The feature-length documentary is about my love for the software industry and the lack of diversity that I see in it.

I am trying to raise enough money to finish the film. It's been a three-year project where I've interviewed over fifty people across several continents. I've talked to developers, educators, and industry leaders about what there is to love about the job that most of us do. We've edited the film and had a couple of test screenings so we're close to being done.

In fact, I shot so much footage that many of the topics I wanted to covered got cut from the film. That has left me with the opportunity to make some short films that covered several of these topics. The first of these is now available:

Read...


Endpoint Routing in ASP.NET Core 3.0

Endpoint Routing was introduced in ASP.NET Core 2.2 but has been made a first class citizen of ASP.NET Core in 3.0. While you're old projects will continue to work without it, upgrading to Endpoint Routing will improve your applications.

Endpoint Routing is a system to handle routing across different middleware systems (e.g. MVC, Razor Pages, Blazor, SignalR and gRPC). By having endpoints that work with each other, you can think of a system more holistically then having terminal middleware that don't talk to each other. Let's see what that actually means in practice.

If you've seen the new project template, you've probably already noticed that setting up RazorPages and MVC look a bit different. First in the ConfigureServices:

Read...


My First Look at ASP.NET Core 3.0

ASP.NET Core 3.0 I'm finally getting around to looking at updating my examples and courses to 3.0. This post is based on .NET Core Preview 8 so this might change in the future.

There are a number of great walkthroughs for moving your ASP.NET Core 2.x projects to 3.0. So I don't want to repeat that. Instead, I want to talk about what's happening, not just a list of things to do.

To discuss these changes, i'll talk about a project I'm current converting (CoreCodeCamp which is the basis for the Atlanta Code Camp), though it's a branch that likely won't be deployed until after the event.

Read...


Developing with Docker and ASP.NET Core

If you've viewed my new "Designing RESTful Web APIs" course on Pluralsight, you've already encountered my small API that I use as an exammple. While the course is platform agnostic, i'll admit that I built it with ASP.NET Core (2.2).

For this new project, I decided that running in a container would be useful as it's pretty self-contained and should just return to it's initial state when the container is restarted. While I won't be releasing that source, I did learn a lot about debugging in a container that I thought I'd share.

I started this new project and opted into using Docker in the project:

Read...


Goodbye MSDN Magazine...You Meant So Much To Me

MSDN Magazine Logo I was talking with David Berry when we both heard the news about MSDN Magazine shutting down after the November issue. I'm really saddened by it.

The reality is that MSDN Magazine had a dramatic impact on my career, both as a reader and an author. I'd like to share my memories of it.

Years back (I think 1998) I went to one of my first development conferences in Boston. There I saw Chris Sells, Don Box, and Jeffrey Richter for the first time. I left there wanting to figure out how to speak at conferences. I loved the idea of sharing my experience with others. Code camps and user groups were in their infantcy so I didn't know of another way to scratch that itch.

Read...


Atlanta Code Camp 2019 Registration Now Open

Atlanta Code Camp)Are you in the Atlanta Area? Want to hear me and a great group of speakers talk about everything in development? If so, it's time to register for this year's Atlanta Code Camp.

I'm planning on talking about gRPC and Vue.js (though the speakers haven't been selected yet). I'm looking forward to being at the entire event this year since I'm not travelling.

This year's event will be held on September 14th, 2019 at:

Read...