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.
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.
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).
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.
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".
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.
Entity Framework Core makes it easy to write tests that execute against an in-memory store but sometimes we want to actually run our tests against a real relational database. In this episode, Monster Dave looks at how to create an integration test that runs against a real SQL Server database.