PHP sigue siendo insuperable. Cuando vemos tecnologias y artefactos de software que ensamblan toda una arquitectura de un proyecto y vemos que chocan unos contra otros y que usar dependencias genera conflictos confirman porque PHP sigue siendo lo que es.
#php#web#html
I always prefer empty collections over null in C#.
You will typically iterate over a collection in a loop.
With null, the calling code must handle the null case and check for null before accessing any collection elements.
We're introducing more responsibility to the caller.
Why not make it easier?
I do this instead (pick one):
- C# 12 collection expressions → []
- Enumerable.Empty
- Array.Empty
- a new List()
Makes life easier for everyone.
P.S. Here are 8 more Clean Code tips: https://t.co/772a9OTjMy
In today's #dotNETConf session replay, we explore new .NET 9 features for combining AI/LLMs into your existing LOB. Drop in to discover new AI tricks for even the most mature dog and take your WinForms LOB apps to the next level! 🎥 https://t.co/YxbKT8HpFO
You're a beginner and you are writing EF code.
How to improve performance? Here are 4 tips ⬇️
1. Avoid query operations in loops
To avoid performing query operations in a loop, you can cache the query results in memory and then operate on the data in memory, which can improve performance.
2. Select only important columns
Instead of loading entire entities, you select only the columns you need. You can achieve this using anonymous types or a DTO (Data Transfer Object).
You only load the columns you need, reducing memory and bandwidth usage.
3. Use the NoTracking method
When AsNoTracking is used, Entity Framework doesn’t track changes to the retrieved entities, which reduces overhead and increases performance, especially for read-only data.
4. Use SplitQuery to separate queries
The SplitQuery option allows EF to execute separate queries for the main entity and its related entities, reducing the impact of large joins.
Using AsSplitQuery can increase performance and reduce complexity in such scenarios.
However, it also means multiple queries will be executed, so be sure to monitor the impact on database load.
Read more: https://t.co/8j41JDzqub
#dotnet
Testing your code is an essential part of creating quality software - but are you sure your tests are testing what you think they are?
In today's #dotNET Foundation user group session, we get a live-coding demo on mutation testing in C# using Stryker. 🎥 https://t.co/0Qk05Sdoni
What should .NET Developers learn next?
You can start with these 18 key areas:
01. Internet basics
02. .NET Essentials
03. https://t.co/EE6GfsR2Fd Core Fundamentals
04. Web API
05. Version Control
06. Databases
07. Testing
08. Security
09. Deployment
10. Task Scheduling
11. Communication
12. Observability
13. Caching
14. DevOps
15. Design Principles
16. Design Patterns
17. Architectural Patterns
18. Essential Libraries
This .NET Backend Developer Roadmap covers all those areas with 110+ topics that every .NET dev should know.
And it's not a simple PDF. Every node in the roadmap is an interactive link to the best video or article on the Web about that topic.
Steal it here while it remains FREE! 👇
https://t.co/Ed7r4wgPJK
Use your .NET skills to become an AI engineer. With the #OpenAI library, #dotNET developers can quickly master critical AI skills and apply them to real world apps. Read the blog to learn more about the OpenAI library for .NET.
https://t.co/gccQKz3cJW
No Swagger in .NET 9?
Here's what you can do about it.
I'll walk you through three alternatives for OpenAPI user interfaces.
- SwaggerUI
- ReDoc
- Scalar
We'll also explore the new OpenAPI package added in .NET 9.
Check it out: https://t.co/K8GGKE8U01
The .NET/C# ecosystem needs to work towards less overengineering for the sake of it.
✅ Instead of 8 layers of abstraction, I am starting with single file transaction scripts with Vertical Slice Architecture.
What tactics are you using to ship more?
#dotnet
I don't let exceptions crash production.
Robust error handling is a priority in my applications.
.NET makes it easy to succeed here.
I use the IExceptionHandler interface to define my handler.
You can handle one type of exception per handler.
You can also have a global catch-all handler.
What happens after catching the exception?
- Log the exception details for debugging
- Return Problem Details to the client with redacted info
I don't want to leak sensitive information to the client.
Here's how all this fits together: https://t.co/czEvvvGxyH
I never understood the hate MediatR attracts.
It's one of the best libraries in the .NET ecosystem.
Here are just some of the things I can do:
- Organize my code around use cases with requests and handlers
- Cross-cutting concerns with pipeline behaviors
- Design highly-testable handlers
- Make API endpoints/consumers thin
You can extend and customize MediatR in so many ways.
There is some overhead with how requests and handlers are connected.
It's implemented at runtime, so you can't "step into" the handler.
The argument is this makes debugging harder.
But I just place everything related to one use case in the same folder.
I can quickly find the relevant files, update, debug, and write tests.
MediatR + Vertical Slice Architecture is the perfect combo.
Learn more: https://t.co/1BkwvZtCvK
What's your take on MediatR?
What is an API Gateway?
API Gateways are the "front door" to your backend services.
API Gateways handle client requests and route them to their destinations.
The client doesn't need to know about your backend architecture.
Key characteristics:
- Request routing
- Authentication
- Authorization
- Load balancing
- Rate limiting
If you're looking for a good technology to build an API Gateway, check out YARP.
Learn more: https://t.co/rfK6APGTRv
Did you know you can use .NET Aspire with AWS to build cloud-native applications? I'm excited to be presenting ".NET Aspire and AWS: a match made in heaven" at NDC London 2025 next week. If you're at the conference, please come by and visit us in the AWS booth. #dotnet#AWS
When you're coding in C#, you'll need to learn how to manage and organize data efficiently.
And this involves choosing the right data structure for the task at hand.
To help you out, @grantdotdev wrote this tutorial where he walks you through lists, arrays, dictionaries, and more with example code.
https://t.co/cw3VLu97u9