#134 Brandon Minnick, Async Await – Common Mistakes, Part 2

Summary
Brandon Minnick of Microsoft continues with his list of common mistakes in async/await programming and suggested solutions.

Details
Don't return awaits (sometimes), ConfigureAwait(false), synchronization context, what about API applications with no UI, and .NET Core is different too. Do I need async if I my threadpool never runs out of threads, consider scaling in the future. New in .NET Core 3, ValueTask (if method has an await but might not use it), heaps and stacks, how to find Brandon.

Links
Brandon's Twitter

Brandon's talk on async/await at NDC Oslo

Download mp3 of podcast

#133 Brandon Minnick, Async Await – Common Mistakes, Part 1

Summary
Brandon Minnick of Microsoft talks about common mistakes when using async/await and offers solutions.

Details
Who he is, what he does. What asynchronous programming is, calling code that will return an answer in the future; multithreading. How to make a synchronous method asynchronous, freeing the calling thread; what the compiler does with async code - awaits, switch statements, move next and try catch. Calling async from sync, don't use .Result() it's a blocking call, .Result() throws an aggregate exception; use .GetAwaiter().GetResult().

Links
Brandon's Twitter

Brandon's talk on async/await at NDC Oslo

Download mp3 of podcast

#124 Mads Torgersen, C# 8

Summary
Mads Torgersen talks about the upcoming release of C#, what's new, what's different, what else is coming in the future. He also answers questions from Twitter.

Details
Who he is, what he does. What new in C# 8; robustness, pits of success; nullable reference types. No breaking changes. Use of language features, IntelliCode. The legacy of String, unicode and UTF8, array, immutability and invariants. Async streams, what it is and history. Bryan's blog on steaming, why async is important, especially if you have a limited number of threads available. Improved patterns matching, recursive patterns. C# 8 relies on a .NET Core Runtime feature. C# 8 and Visual Studio schedules are independent; upcoming schedules for .NET Core and .NET 5. Questions from Twitter - records and roles, expression tree updates, compiler flags, AOT, tiered compilation, type providers, async/await inside LINQ expressions, discriminated unions, Typescript style inline union. Relationship between C# design team and the compiler team. Mads encourages us all to use the previews of C# 8 and let him know if you find a problem.

Links
Mads' twitter
What's new in C# 8
C# repo on GitHub

Download mp3 of podcast

#101 Andrew Lock, .NET Core

Summary
Andrew Lock, blogger and author of ASP.NET Core in Action talks to me about the .NET Core and why you should probably use it instead of Framework.

Details
Who he is, what he does. His book. Why did Microsoft build .NET Core, the complications of Web API Core running on Framework. Platforms it works on. New configuration system, typed configs. Dependency injection is built-in now, a mention of HttpClientFactory. Middleware, pipelines to perform tasks. Authentication and authorization, policy server. Kestrel server.

Links
Andrew's blog
Andrew's twiter

Download mp3 of podcast

#96 Steve Gordon, Http Client Factory in .NET Core 2.1

Summary
Steve Gordon and I talk about the new Http Client Factory in .Net Core 2.1. We cover what's new, what's different and how to use Polly, the .NET resilience framework with it.

Details
Who he is, what he does, meetup group, Humanitarian Toolbox. What is wrong with Http Client, exhausting sockets; using a singleton, DNS problems. Http Client Factory, creates a client pool, using DI to create the clients, named and typed clients, testing. Http Client Handlers. Using Polly with Http Client, differentiating between policies for a given endpoint, wrapping, calling delegates.

Links
Steve's homepage

Steve's series on Http Client Factory.
Steve's twitter

Steve's MS Doc's page

Scott Hanselman's post on Http Client Factory.

Download mp3 of podcast

#71 Dylan Reisenberger, The Polly Project

Summary
Dylan Reisenberger talks about Polly, a resilience and transient-fault-handling library for .NET. Commonly used for retries, circuit breaking and fallback when calling remote services.

Details
Who he is. Quick overview of Polly, why do I need Polly - the network is not reliable. History of the Polly project. How popular it is. What a resilience framework is. Retries in Polly; backoff; doing other things during the retry. Policies, what they are. Handling exceptions and result codes. Circuit breaker; what it is; why use them. Using policies together, wrapping. Stability patterns, bulkhead isolation. Queues. How to execute a web request with Polly. Using Polly for things other than web requests. Re-authorization of requests. No .NET alternatives. Future work, caching, policy registry, metrics, reactive extensions. How to help.

Download mp3 of podcast

Links
Polly home

Polly GitHub

#58 Brock Allen, Identity Server

Summary
Brock Allen talks to me about Identity Server, authentication and balancing a consulting job with an open source project.

Details
Who he is and what he does; what Identity Server is and how it works, OpenId Connect, OAuth 2, examples of the protocols; Dominick Baier; what's wrong with a username and password, single sign on; how Identity Server works, can use multiple types of authentication, federation gateway pattern, third party permissions; Identity Server users, claims, roles, authorization, policy based authorization; are they building it for Microsoft, other third party libraries Microsoft is pushing; testing Identity Server; balancing consulting and building Identity Server; release candidate.

Links
Identity Server
Upcoming training and conference

Download mp3 of podcast

#39 Scott Allen, ASP.NET 5

Summary
Scott Allen, author, Pluralsight author, podcast host and consultant tells me all about the upcoming release of ASP.NET 5.

Details
Who he is; is ASP.NET 5 a rewrite; lightweight, better for SPAs; Scott's favorite new features ; don't need vs 2015, works on Linux; more modular; cross platform, core (subset) CLR; lighter on resources; inbuilt dependency injection; new configuration system; middleware, its history and how it differs from handlers and filter, middleware sees more; combining MVC and Web API; tag helpers; web forms are gone; is Microsoft providing better documentation and examples; front-end improvements, angular, bootstrap, Grunt, Gulp, Bower.

ASP.NET 5 Schedule and Roadmap

Download mp3 of podcast
 

#1 Anthony van der Hoorn and Nik Molnar, Glimpse Project

A discussion with the creators of the Glimpse project, Anthony van der Hoorn and Nik Molnar. We chat about the origins of Glimpse, what it does, how it works and where it is going.

See http://getglimpse.com for more.

Download mp3 of podcast

Book recommendations
Nik – Head First Design Patterns, Refactoring: Improving the Design of Existing Code, Pro ASP.NET MVC Framework (Expert’s Voice in .NET)

Anothony –
The Passionate Programmer, The Clean Coder, Head First Design Patterns, Secrets of the JavaScript Ninja, Learning JavaScript Design Patterns, JavaScript: The Good Parts

Audio notes
Apologies for the quality of audio at some points in the recording.