Best of Nick Chapsas — 2024
- 1
- 2
Nick Chapsas·2y
Swagger is Gone in .NET 9! Replace It With This.
Swagger has been removed in .NET 9 and replaced with Microsoft's built-in OpenAPI functionalities. To adapt to this change, developers can use the 'app.mapOpenAPI' call for API documentation without a UI. Alternatively, they can integrate third-party tools such as Swashbuckle to restore the Swagger UI, or use Scaler, which offers a modern and customizable API documentation UI. Scaler provides various themes and integration options, including dark mode and authentication schemes, making it a versatile alternative.
- 3
Nick Chapsas·2y
Stop Using FirstOrDefault in .NET! | Code Cop #021
Nick explains why using the Find method over FirstOrDefault in .NET lists can be a misleading practice. He highlights performance comparisons and how optimizations in .NET 9 make FirstOrDefault faster, emphasizing the importance of understanding such nuances to avoid harming code and performance.
- 4
Nick Chapsas·2y
Forget Controllers and Minimal APIs in .NET!
Learn how to get started with building APIs in .NET using the alternative to controllers and minimal APIs called Fast End Points. Fast End Points is a developer-friendly alternative that nudges you towards the request and response pattern and offers better performance than controllers. Discover the basic registration process and how to implement endpoints for getting all movies, getting a single movie, and creating a movie.
- 5
Nick Chapsas·2y
Stop Using AutoMapper in .NET
The post discusses the drawbacks of using AutoMapper and other mapping libraries in .NET, advocating for manual mapping instead. It highlights issues such as the introduction of runtime errors, complexity, and debugging difficulties when using these libraries. The author suggests using simple extension methods for mapping and emphasizes the importance of maintaining control over the code. Alternatives like compile-time libraries are mentioned but manual mapping is preferred for its simplicity and reliability.
- 6
- 7
- 8
- 9
Nick Chapsas·2y
Everything New Added in .NET 9 with Examples
Nick introduces various new features of .NET 9, focusing on practical implementations that developers will find useful. Key features include feature switching for managing feature flags, improvements in LINQ for simplified code, and hybrid cache for combining memory and distributed caching under a common API. Additionally, there are significant enhancements in handling spans and new functionalities like ordered GUIDs. The video provides detailed examples and real-world applications of these features.
- 10
- 11
Nick Chapsas·1y
Make Your API Requests INSANELY Fast in .NET
Nick demonstrates how to use the Replicant package to significantly improve the performance of API requests by caching responses. The method ensures that repeated API calls are nearly instantaneous by leveraging HTTP headers and caching mechanisms. This approach works with any API and greatly reduces the response time by avoiding duplicate data fetching.
- 12
- 13
- 14
Nick Chapsas·2y
Swagger is Going Away in .NET 9!
Swagger is being removed in .NET 9, but alternative packages are available. Microsoft is aiming to provide more flexibility and features with their own package. The decision has sparked a discussion on whether Microsoft should build these packages in-house or support external packages.