In this #dotNETConf session replay, we tour the new Blazor hybrid tools and templates in .NET 9 and see how to reuse UI to build solutions that target the web at the same time. π₯ https://t.co/WKENdNl3Nw #dotNETMAUI
Using C# 8 Index to access elements from the back of the array.
This reminds me of some powerful stuff you can do with N-dimensional arrays in Python.
It's not quite as potent, but it's practical syntax sugar.
Here's a bonus LINQ tip: https://t.co/bztjcL94gE
You've probably used xUnit, NUnit or MSTest for .NET tests. Have you heard of TUnit, a new .NET 8+ testing framework? It uses source generators & supports AOT, & can be up to 2000x faster than existing testing frameworks!
Learn more: https://t.co/ikYaFzqroT @sandertenbrinke
You can now test your APIs without leaving VS Code.
But how?
Well, Postman just released a VS Code extension to GA.
The Postman VS Code extension enables you to develop and test your APIs in Postman directly from Visual Studio Code.
All your favorite Postman features are now available in VS Code:
- Sending API requests (HTTP, gRPC, WebSocket)
- Using collections to organize your request
- Different environments for your APIs
- And much more...
Check it out here: https://t.co/8YxNQxRT6J
Our Copilot extensions are third-party agents designed for every day tasks. The @perplexity_ai agent is particularly bad ass. And now they are free.
https://t.co/MMenzOQr1e
Liskov Substitution Principle (LSP)
inconsistency examples π§΅
#dotnet
LSP is one of the SOLID principles and says:
"Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program."
If we have a class hierarchy, we should be able to use a subclass wherever the base class is expected, without breaking the application. The subclass should behave in a way that does not violate the expectations set by the base class.
Below β¬οΈ is four examples which are inconsistent with LSP and should help to demonstrate the principle more.
Bookmark it.
When should we use signals and when should we use #RxJS?
This is a question that bothers many #Angular developers right now. There are no easy answers. But I think there is an easy rule of thumb on how to approach this
Always start with signals - they are simpler and have a small API. If, at some point, you realize you want something asynchronous (timing stuff, HTTP, etc), convert it to an Observable (using `toObservable`, not literally!)
Also, if you realize you want some of the synchronous operators like `filter` or `map`, consider doing the same thing with a `computed` or `linkedSignal` first. In many cases, you'll realize you don't need an Observable there.
Finally, when it is time to show something in the UI based on your Observable, convert it to a signal using `toSignal`
This is not a silver bullet but will help avoid lots of complicated scenarios
I use these 9 awesome libraries in almost all my .NET projects! π
These libraries make development easier, more efficient, and cleaner. Here's why I love them:
1. Serilog: Hands down, the best logging library out there! π
2. EF Core: The standard for seamless data communication in .NET apps. ποΈ
3. MediatR: Simplifies component communication and makes implementing CQS/CQRS patterns a breeze. π¬
4. FluentValidation: The most elegant way to validate incoming requests. β
5. Hangfire: A super cool library for handling background jobs. β³
6. Polly: The go-to library for building resilient HTTP clients. π
7. FluentAssertions: Makes your test cases easy to write and even easier to read. π§ͺ
8. Refit: Arguably the best way to handle HTTP calls in .NET. π¦
9. xUnit: A testing framework that just works. Simple, powerful, and reliable. π―
What additional libraries do you frequently use in your projects? Share your favorites in the comments!
π Iβve launched a FREE .NET Zero to Hero Course on my blog, guiding you step by step to build scalable .NET apps with Clean Architecture.
Get notified by subscribing to my YouTube channel: Subscribe Here: https://t.co/K92AUm2twq
#DotNetDevelopers #CleanCode #CodingLife #NetLibraries #SoftwareDevelopment #DotNetZeroToHero #YouTube