The Monsters Weekly - Episode 92 - Saving CPU Cycles with Static Resource Hashes

In today’s episode, Monster Dave prototypes an approach to generating static resource URLs to potentially improve the performance of an ASP.NET Core application. Borrowing ideas from a recent blog post by the Facebook engineering team.

 

First, we create a tag helper to generate static resource URLs based on a hash of the file’s contents. Next, we write some custom middleware to rewrite those new URLs to the actual file and to always return 304 not-modified for all conditional requests.

The Blog Post: https://code.facebook.com/posts/557147474482256

NOTE: This video is intended to explore the concepts outlined in the blog post above and are not be suited for production use.

The Monsters Weekly - Episode 91 - Middleware vs. Filters

Middleware and filters both seem to fill similar needs in the ASP.NET Core MVC space, so what separates them, and when would you choose to build one over the other?

Join Monster James in this episode to find out more about the intent of each feature of ASP.NET and when to elect to create custom middleware or build a filter for your actions. 

The Monsters Weekly - Episode 90 - Formatting Dates

In today’s episode, Monster Dave takes is through the magic that happens in MVC when converting strings from an incoming request to DateTime types in a controller. (Spoiler alert, it’s not actually magic).

Related Links:

ASP.NET Monsters #77: Internationalization Part 2 - Request Localization

ASP.NET Monsters #77: Internationalization Part 2 - Request Localization

Standard .NET Date Time Formats

The Monsters Weekly - Episode 89 - URL Rewrite Middleware

Learn how to build complex URL Rewrites without messy XML configuration.  In today’s episode Monster James gives us a quick tour of the new URL Rewrite middleware in ASP.NET Core.

NuGet Package

The Monsters Weekly - Episode 88 - Inside Compiled Views in the Razor View Engine

Have you ever wondered how scripts are inserted into your layout from a view, or how the debugger knows which line of code you are on when you’re using partial views? 

In this episode, Monster James dives into the classes that are generated automatically behind the scenes and ultimately compiled at runtime to give your application the capabilities required to generate HTML for your client.

More reading:

The Monsters Weekly - Episode 87 - Building a Roslyn Analyser

If you’ve used Visual Studio 2015 then you’ve used the Roslyn managed compiler. Roslyn is unlike most any other compiler in that it offers a simple approach to adding your own warnings and errors to the build pipeline. In this episode we’ll build a simple analyser. Our American friends might know these as "Analyzers".

 

References

C# and Visual Basic - Use Roslyn to Write a Live Code Analyzer for Your API

The Monsters Weekly - Episode 86 - Pugzor

Earlier in November, the ASP.NET Monsters had the opportunity to take part in the ASP.NET Core hackathon at the Microsoft MVP Summit. In past years, we have used the hackathon as an opportunity to spend some time working on GenFu. This year, we wanted to try something a little different.

In this episode, we explore our monstrous creation: Pugzor, an alternate view engine for MVC built with Pug and Node Services.

Related Links:

Episode #82 - Node Services

Pugzor on GitHub

Blog Post

 

The Monsters Weekly - Episode 85 - Suave Web Services

We love ASP.NET but we also love web stuff in general. In today’s episode we take a quick look at building a simple service using Suave the F# web framework. 

 

References:

Suave Web Services

suave.io

Chiron