
Huge .NET fan ⚡ Passionate about clean architecture, design patterns & better ways to build software | On a journey to sharpen my communication skills
Yaounde, Cameroon
Joined March 2021
- Tweets117
- Following228
- Followers6
- Likes949
Christian Armand retweeted
What did I do in June ?
Je commence à aimer cette routine : chaque début de mois, je vous résume mes activités phares.
Cette fois, c'était le 1er mois de test de gabee.app, un mini-jeu pour enfants.
Mes neveux en ont raffolé et ont adoré jouer les bêta-testeurs. Et bien sûr, ils m'ont laissé un tas de feedbacks que je n'ai pas encore corrigés 😅
Je vous présente donc 𝗚𝗮𝗯𝗲𝗲, un jeu éducatif pour les 6–10 ans.
Clavier, code, langue, maths pour garder leurs esprits vifs et un temps d'écran qui compte.
Créez vos comptes, faites tester 👉 gabee.app 💛
#Gabee #EdTech #Cameroun #TechForKids
Christian Armand retweeted
𝗧𝗵𝗲𝗿𝗲'𝘀 𝗮 𝗰𝗼𝗹𝗹𝗲𝗰𝘁𝗶𝗼𝗻 𝗶𝗻 .𝗡𝗘𝗧 𝘁𝗵𝗮𝘁 𝗿𝗲𝗮𝗱𝘀 𝟮-𝟰𝘅 𝗳𝗮𝘀𝘁𝗲𝗿 𝘁𝗵𝗮𝗻 𝗮 𝗗𝗶𝗰𝘁𝗶𝗼𝗻𝗮𝗿𝘆.
Most devs have never used it.
It's called FrozenDictionary (and FrozenSet), added in .NET 8.
Here is the idea 👉
You build it once. You read it many times. It never changes.
Think about the data you already treat this way:
→ Country codes
→ Role names
→ Feature flags
→ Allowed file extensions
You load it at startup and never touch it again.
But a regular Dictionary doesn't know that.
It stays ready for adds, removes, and resizes that you will never do. That flexibility costs you on every single read.
𝗛𝗼𝘄 𝗙𝗿𝗼𝘇𝗲𝗻 𝗰𝗼𝗹𝗹𝗲𝗰𝘁𝗶𝗼𝗻𝘀 𝘄𝗶𝗻
When you call ToFrozenDictionary, .NET spends extra time up front to study your data.
Then it picks the best internal layout for it:
→ Short string keys get a string-tuned hash
→ Small integer ranges can use direct indexing
→ Tiny sets use a fast linear scan
You pay once at build time. You get faster reads forever.
The trade-off is simple:
❌ Slower to create (2-10x)
✅ Faster to read (2-4x, even more for strings)
𝗪𝗵𝗲𝗻 𝘁𝗼 𝘂𝘀𝗲 𝗶𝘁
→ Lookup tables loaded at startup and never changed
→ A long switch over string literals (swap it for a Contains check)
→ Any read-heavy set you build once per request
𝗪𝗵𝗲𝗻 𝘁𝗼 𝗮𝘃𝗼𝗶𝗱 𝗶𝘁
→ The collection changes after you build it (no Add or Remove)
→ You only read it a few times
→ You're still on .NET 7 or older
Have you tried FrozenDictionary in a real project yet?
——
♻️ Repost to help others speed up their .NET reads
➕ Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
Christian Armand retweeted
A user tells you: "Something went wrong when I tried to place my order"
You open the logs.
There are thousands of requests from hundreds of users. You can see errors, slow database calls, and failed API requests.
But you cannot tell which ones belong to the user who reported the problem.
That is a painful way to debug an app.
A small improvement can make a big difference: add user context to your request tracing.
In an ASPNET Core app, once the user is authenticated, you can take their user ID and add it to the logs and trace for that request.
Now, when someone reports a problem, you can search for that user ID and follow what happened:
→ Which endpoint they called
→ Which request failed
→ Which database call was slow
→ Which logs belong to the same flow
This is also useful in multi-tenant apps, where adding a tenant ID can help you spot issues affecting one customer account.
There is an important rule here: do not put names, email addresses, or other personal data into your traces. Use safe, opaque IDs and be careful about where logs are stored.
Good tracing is not about collecting more data.
It is about having the right context when something goes wrong.
Here is a simple way to enrich ASPNET Core logs and OpenTelemetry traces with user context: milanjovanovic.tech/blog/bet…
Christian Armand retweeted
Your modular monolith may not be as modular as you think.
It may have clean module names.
Billing.
Notifications.
Reporting.
Users.
But open the Billing module and you may find it doing all four jobs.
Charging customers.
Sending emails.
Building reports.
Changing user accounts.
That is not a real boundary.
That is a large monolith hiding inside a smaller one.
How do you fix it?
Not by jumping straight to microservices.
Start with one clear split.
For example, move notifications out of billing.
Then remove the direct call between them.
Billing should say:
"A customer was charged."
Notifications can react to that event on its own.
Next, work on data ownership:
→ One clear module per business area
→ Separate database access per module
→ No hidden reads from another module’s tables
→ Clear rules for how modules communicate
The goal is not more projects or folders.
You want to make one part of your app easier to change without breaking three others.
You do not need to split everything at once.
Find the module that has grown too large.
Extract one responsibility.
Ship it.
Repeat.
I wrote a practical step-by-step refactor for overgrown modules in a .NET modular monolith: milanjovanovic.tech/blog/ref…
Christian Armand retweeted
If you already knew all 25 hacks, unfollow me.
Almost nobody makes it past .NET hack 11:
(#23 surprised even me):
1. async all the way down. One blocking .Result deadlocks the chain.
2. ConfigureAwait(false) belongs in libraries. Not in your app code.
3. Return the Task directly when you don't await it. Skip the state machine.
4. ValueTask for hot paths that usually finish synchronously. Not everywhere.
5. IEnumerable is lazy. Enumerate it twice, you run the query twice.
6. Here's where most people stop reading. IQueryable runs on the database. IEnumerable drags it all into memory first.
7. .ToList() too early kills your filters. Push Where before you materialize.
8. The N+1 problem is silent. Turn on EF Core query logging and watch it happen.
9. AsNoTracking() for reads. Change tracking isn't free.
10. Project to DTOs with Select. Never pull your whole entity.
11. Scoped inside a Singleton is a captured-dependency bug waiting to happen.
12. Don't new up HttpClient per request. Use IHttpClientFactory.
13. Span<T> and stackalloc parse without allocating. Zero GC pressure.
14. StringBuilder over += in loops. Every concat is a brand new string.
15. Prefer string.Create and pooled buffers over hidden allocations.
16. Records for immutable data. with gives you free non-destructive copies.
17. Pattern matching beats if/else ladders. Switch expressions read cleaner.
18. Nullable reference types on, day one. The warnings are bugs you haven't hit yet.
19. The Options pattern over IConfiguration injection. Strongly typed and validated.
20. CancellationToken everywhere async. Pass it down, don't swallow it.
21. BackgroundService, not a rogue Task[.]Run. Let the host own the lifetime.
22. Measure before you optimize. BenchmarkDotNet, not gut feeling.
23. This is the one that got me: sealed your classes by default. It's a free JIT optimization.
24. Native AOT for fast startup and a tiny footprint. Trim what you don't need.
25. Last one, and the only rule that matters: read the SQL EF Core generates. The abstraction lies until you look.
——
♻️ Repost to help others write faster, cleaner .NET
➕ Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
Christian Armand retweeted
When an API request fails, your API still has a job to do.
A plain 500 error is not enough.
The caller needs to know:
→ What went wrong?
→ Was the request invalid?
→ Was the resource missing?
→ Can they fix the request and try again?
And you need logs that help you find the real cause.
The first version of global error handling in ASPNET Core is often simple:
Catch every error in middleware.
Log it.
Return a response.
That works.
Until you have validation errors, missing records, conflicts, and other cases that should return different results.
Then one middleware class starts doing too much.
A cleaner approach is to use modern exception handlers:
→ One handler for validation errors
→ One handler for known app errors
→ One final handler for unexpected failures
→ One standard Problem Details response format
Now each handler has one job.
Your API returns errors in a clear shape.
And your business logic does not need the same error code copied across every endpoint.
Happy paths are easy to demo.
Good error handling is what makes an API feel solid in real use.
I walked through the old approach, the better built-in tools, and the setup I would use in a new ASPNET Core app: milanjovanovic.tech/blog/glo…
Christian Armand retweeted
Mettez votre SaaS ou votre app mobile en commentaire les builders Kmer, qu’on montre un peu le potentiel du 237 ! 🇨🇲🚀
Ailleurs les gars partagent leurs projets tous les jours sur X, chez nous les gens ont peur qu'on vole leur idée "révolutionnaire" 🤣.
Sortez vos projets, on veut voir ça ! 👇
Christian Armand retweeted
Six or seven years ago, I was asked an interview question I still think about.
A user clicks a button to generate a report.
It takes five minutes.
How would you make that flow better?
My first thought was simple:
Make the code faster.
Improve the query.
Cache some data.
Speed up the file creation.
Those ideas are not wrong.
But I was solving the wrong problem.
Even if the report takes one minute instead of five, the user is still stuck waiting.
The better question is:
Why is the user waiting at all?
Today, I would handle this in a different way:
→ Accept the request right away
→ Create the report in the background
→ Store the finished file
→ Notify the user when it is ready
The report may not finish much faster.
But the app feels faster.
It is also easier to retry failed jobs, track progress, and handle more users at once.
That one interview question changed how I think about system design.
I wrote about the answer I missed back then, and the design I would choose today: milanjovanovic.tech/blog/the…
Christian Armand retweeted
The happy path is comfortable.
That’s why it’s dangerous.
You write a registration flow:
- save the user
- send a welcome email
- track the signup in analytics
It looks clean.
It reads well.
It works locally.
Then production happens.
The email provider is slow.
The analytics API returns 503.
The network times out halfway through.
Now your "simple" method has to answer uncomfortable questions:
Should the user wait for analytics?
Should registration fail because email is down?
What happens if the user is saved, the email is sent, and analytics fails?
Do you roll back?
Do you retry?
Do you leave the system inconsistent?
This is where interfaces don’t really save you.
`IEmailService` and `IAnalyticsService` decouple implementation details.
They don’t decouple orchestration.
Your user registration flow is still directly responsible for side effects that belong somewhere else.
The first step is domain events.
The registration flow should say:
"User registered."
Then other handlers decide what to do.
Send email.
Track analytics.
Invalidate cache.
But domain events alone don’t solve reliability.
If the process crashes at the wrong time, you can still save the user and lose the event.
That’s where the Outbox pattern comes in.
Save the user and the event in the same database transaction.
Then publish the event later from a background worker.
Now email or analytics failures don’t break registration.
And if the next step is a mandatory business dependency?
That’s when you need a Saga.
Simple notifications?
Domain Events + Outbox.
Critical workflows with compensation?
Saga.
The real lesson:
Decoupling is not just about cleaner code.
It’s about designing around failure boundaries.
I wrote a full breakdown here: milanjovanovic.tech/blog/the…
Christian Armand retweeted
You paid for courses on Udemy, Coursera or LinkedIn Learning, but your internet connection keeps getting in the way of actually finishing them? Udemie is here to help.
This desktop app lets you download your purchased courses directly to your computer and access them anytime, no internet connection required.
How does it work?
You watch your courses in your own video player, without being stuck in a browser tab that struggles every time your bandwidth drops.
You keep your courses archived on your machine, without depending on a platform's availability or whether your subscription is still active.
You learn at your own pace, on the go, without wifi, without worrying about data cuts halfway through a lesson.
Check out Udemie here: builderswave.com/launch/2b83…
Christian Armand retweeted
There is a specific kind of restlessness that only developers understand.
An idea keeps running in the background.
While you’re eating.
While you’re walking.
While you’re trying to sleep.
You don’t know if it will become a business.
You don’t know if anyone will use it.
You just feel the urge to build it.
I chased that feeling hard a few years ago.
I wanted to build a small SaaS, ship it, get users, maybe turn it into a real business.
Most of those ideas didn’t work.
But looking back, I don’t see wasted time.
I see the place where my skills were forged.
When you build something from scratch, you learn differently.
You own every decision:
- database schema
- authentication
- background jobs
- payment integrations
- deployment
- UI details
- ugly tradeoffs
No tutorial gives you that.
No course fully replaces it.
You develop judgment by making decisions and living with the consequences.
That urge eventually pushed me in a direction I didn’t expect:
content creation.
I stopped building SaaS products and started building educational content for developers.
Different kind of building.
Same itch.
And honestly, it became the most rewarding work I’ve done.
But the urge to build something new never really goes away.
Maybe that’s the point.
Maybe the outcome is not always the product.
Maybe the transformation is.
I wrote a more personal post about side projects, failed SaaS ideas, content creation, and why I think every developer should build something of their own: milanjovanovic.tech/blog/the…
Christian Armand retweeted
Rolling your own authentication is almost never worth it.
At first, it looks simple:
- store users
- hash passwords
- issue tokens
- validate tokens
Then the real requirements show up:
- password resets
- email verification
- MFA
- refresh tokens
- session management
- social login
- enterprise SSO
- security patches forever
This is why I like using Keycloak.
It gives you a full identity provider you can run in a container.
Your ASPNET Core API does not handle user credentials.
It only validates signed JWTs.
The flow looks like this:
1. User clicks Authorize in your UI
2. Browser redirects to Keycloak
3. User logs in there
4. Keycloak redirects back with an authorization code
5. Your UI exchanges it for tokens using PKCE
6. API receives the Bearer token
7. ASPNET Core validates the token signature, issuer, audience, and claims
The important part:
Your API does not call Keycloak on every request.
It fetches the signing keys from the JWKS endpoint, caches them, and validates tokens locally.
Fast, clean, and much easier to reason about.
For local development, you can spin up Keycloak with Docker, create a realm, register a public client, wire Swagger UI to OAuth 2.0, and add JWT Bearer authentication in ASPNET Core.
For production, don’t forget the boring but important parts:
- HTTPS everywhere
- persistent storage
- proper hostname configuration
- no relaxed metadata validation
I wrote a full walkthrough of integrating Keycloak with ASPNET Core using OAuth 2.0, Authorization Code + PKCE, Swagger UI, JWT validation, and Aspire tracing: milanjovanovic.tech/blog/int…
Christian Armand retweeted
𝗧𝗵𝗲 𝗰𝗼𝗺𝗽𝗹𝗲𝘁𝗲 𝗖𝗹𝗲𝗮𝗻 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 𝗖𝗵𝗲𝗮𝘁𝘀𝗵𝗲𝗲𝘁 𝗳𝗼𝗿 .𝗡𝗘𝗧 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀
Everything you need to build scalable .NET apps. In one place 👇
If you want to architect .NET applications the right way, you need to understand these Clean Architecture concepts:
📌 𝗟𝗮𝘆𝗲𝗿𝘀 (𝗱𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝘆 𝗿𝘂𝗹𝗲: 𝗶𝗻𝘄𝗮𝗿𝗱 𝗼𝗻𝗹𝘆)
→ 𝗣𝗿𝗲𝘀𝗲𝗻𝘁𝗮𝘁𝗶𝗼𝗻 — Minimal APIs, Controllers, GraphQL, gRPC, Blazor
→ 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 — Use cases, Commands, Queries, Services
→ 𝗗𝗼𝗺𝗮𝗶𝗻 (𝗰𝗼𝗿𝗲) — Entities, Value Objects, Aggregates, Domain Events, Interfaces
→ 𝗜𝗻𝗳𝗿𝗮𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 — Database, External APIs, Cache, File system, Message bus
Domain has no dependencies.
Infrastructure depends on Domain.
Application depends on domain and uses infrastructure interfaces.
Presentation depends on application and domain.
📌 𝗩𝗲𝗿𝘁𝗶𝗰𝗮𝗹 𝗦𝗹𝗶𝗰𝗲𝘀 — 𝗙𝗲𝗮𝘁𝘂𝗿𝗲 𝗙𝗼𝗹𝗱𝗲𝗿𝘀
Organize by feature, not by technical concerns.
Orders → CreateOrder, ConfirmOrder
(all related code stays together)
Instead of scattering code across Controllers, Services, Repositories.
Each slice owns its endpoint, handler, and mapping.
Endpoint → Handler → DbContext
No MediatR required.
Endpoint calls handler directly.
Simple, debuggable, testable.
📌 𝗣𝗿𝗮𝗴𝗺𝗮𝘁𝗶𝗰 𝗗𝗮𝘁𝗮 𝗔𝗰𝗰𝗲𝘀𝘀
❌ Generic Repository — DbSet<T> is already a repo. Wrapping it adds noise with no benefit.
✅ DbContext directly — EF Core already is Unit of Work. SaveChanges() commits the transaction.
Still use a Repository or Specification Pattern when you need query encapsulation or abstracting for more control.
📌 𝗗𝗗𝗗 — 𝗥𝗶𝗰𝗵 𝗗𝗼𝗺𝗮𝗶𝗻 𝗠𝗼𝗱𝗲𝗹 & 𝗘𝘃𝗲𝗻𝘁𝘀
Behavior lives on the aggregate, not in services.
Raise events to decouple side-effects.
→ 𝗗𝗼𝗺𝗮𝗶𝗻 𝗲𝘃𝗲𝗻𝘁𝘀 — in-process, same transaction, dispatched before/after SaveChanges
→ 𝗜𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗶𝗼𝗻 𝗲𝘃𝗲𝗻𝘁𝘀 — out-of-process, after commit, use Outbox Pattern for delivery
📌 𝗧𝗲𝘀𝘁𝗮𝗯𝗶𝗹𝗶𝘁𝘆
→ 𝗨𝗻𝗶𝘁 𝘁𝗲𝘀𝘁𝘀 — Domain logic, Value objects, Specifications
→ 𝗜𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗶𝗼𝗻 𝘁𝗲𝘀𝘁𝘀 — Handlers with real DbContext, WebApplicationFactory, Testcontainers
→ 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 𝘁𝗲𝘀𝘁𝘀 — Enforce dependency rules with NetArchTest
📌 𝗘𝘀𝘀𝗲𝗻𝘁𝗶𝗮𝗹 𝗦𝘁𝗮𝗰𝗸
• .NET 10 Minimal APIs / Controllers
• Manual handlers and manual mapping
• Result Pattern
• Specification Pattern
• EF Core as Unit of Work
• NetArchTest
• WebApplicationFactory + Testcontainers
• Outbox Pattern
• MassTransit + RabbitMQ
• .NET Aspire + Docker
Bookmark this post.
You will come back to it.
Which Clean Architecture concept was the hardest for you to implement in a real project?
——
♻️ Repost to help other .NET developers build better architecture
➕ Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
Christian Armand retweeted
𝗥𝗘𝗦𝗧 𝗔𝗣𝗜 𝗕𝗲𝘀𝘁 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝘀 𝗶𝗻 𝟮𝟬𝟮𝟱
I've built 100+ APIs, here's what I learned 👇
Most developers struggle with REST API design.
𝟭. 𝗥𝗘𝗦𝗧 𝗠𝗮𝘁𝘂𝗿𝗶𝘁𝘆 𝗟𝗲𝘃𝗲𝗹𝘀
Level 0: Single endpoint (❌ avoid)
Level 1: Multiple resources
Level 2: ✅ Proper HTTP methods
Level 3: HATEOAS (when needed)
𝟮. 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲 𝗡𝗮𝗺𝗶𝗻𝗴
✅ Use nouns: /users, /orders
❌ Avoid verbs: /getUsers, /createOrder
✅ Be consistent: user-profiles or product-carts
❌ Avoid: UserProfiles, userProfiles
𝟯. 𝗛𝗧𝗧𝗣 𝗠𝗲𝘁𝗵𝗼𝗱𝘀 & 𝗦𝘁𝗮𝘁𝘂𝘀 𝗖𝗼𝗱𝗲𝘀
Methods:
• GET → Read
• POST → Create
• PUT/PATCH → Update
• DELETE → Remove
Success Codes:
• 200: Success
• 201: Created
• 202: Accepted (async)
• 204: No Content
Error Codes (client):
• 400: Bad Request
• 401: Unauthorized
• 403: Forbidden
• 404: Not Found
• 422: Validation Failed
Error Codes (server):
• 500: Internal Error on Server
• 503: Service Unavailable
𝟰. 𝗔𝗣𝗜 𝗩𝗲𝗿𝘀𝗶𝗼𝗻𝗶𝗻𝗴
Choose one:
• URI: /api/v1/users ✅
• Header: X-Api-Version
• Media Type: application/vnd.api.v1+json
• Query String: ?version=1 (avoid)
𝟱. 𝗥𝗲𝗾𝘂𝗲𝘀𝘁/𝗥𝗲𝘀𝗽𝗼𝗻𝘀𝗲 𝗕𝗲𝘀𝘁 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝘀
• Always use JSON
• Standardize error responses
• Support filtering & pagination
• Document with OpenAPI/Swagger
𝟲. 𝗦𝗲𝗰𝘂𝗿𝗶𝘁𝘆 𝗖𝗵𝗲𝗰𝗸𝗹𝗶𝘀𝘁
✅ HTTPS everywhere
✅ OAuth2/JWT auth
✅ Rate limiting
✅ Input validation
✅ Response caching
_____
📌 25,000 software engineers read my free REST API guide:
↳ antondevtips.com/blog/best-p…
➡️ REST Maturity Levels
➡️ How to name resources correctly for clean API design
➡️ Choosing the correct HTTP methods
➡️ Choosing the correct status codes
➡️ Implementing API versioning strategies that work
➡️ Structuring requests and responses with proper standards
👉 If you want to reach the top 1% of .NET developers, join 25,000+ engineers reading my .NET Newsletter.
——
♻️ Repost to help other developers build better APIs
➕ Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
📌 Save this post for future reference!
Christian Armand retweeted
𝗧𝗼𝗽 𝟭𝟱 𝗠𝗶𝘀𝘁𝗮𝗸𝗲𝘀 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 𝗠𝗮𝗸𝗲 𝗪𝗵𝗲𝗻 𝗖𝗿𝗲𝗮𝘁𝗶𝗻𝗴 𝗔𝗣𝗜𝘀
List of mistakes and how to avoid them 👇
1️⃣ Not Using API Versioning
Without versioning, changes to your API can break existing client applications that rely on older endpoints.
2️⃣ Poor Error Handling
Poor error handling leads to uninformative error messages, making it difficult for clients to diagnose issues.
3️⃣ Lack of Authentication and Authorization
Failing to secure your API exposes it to unauthorized access and potential data breaches.
4️⃣ Ignoring Asynchronous Programming
Synchronous code can lead to thread blocking and preventing them from handling other requests. This reduces performance significantly.
5️⃣ Not Following RESTful Conventions
Ignoring RESTful principles can lead to inconsistent and non-standard APIs.
6️⃣ Not Validating Input Data
Accepting unvalidated input can lead to security vulnerabilities and data integrity issues.
7️⃣ Ignoring Security Best Practices
Ignoring security measures can expose your API to attacks like SQL injection or cross-site scripting.
8️⃣ Poor Logging and Monitoring
Without proper logging, diagnosing issues becomes challenging, especially in distributed systems.
9️⃣ Lack of API Documentation
Without clear documentation, clients struggle to understand how to use your API.
🔟 Not Optimizing Database and Data Access Layer
Unoptimized database queries and inefficient data access code can lead to slow performance and scalability issues.
1️⃣1️⃣ Returning Too Much Data Without Paging, Filtering, or Sorting
Sending large datasets can lead to performance bottlenecks and increased bandwidth usage.
1️⃣2️⃣ Not Using Caching
Not using cache for frequently accessed data can result in unnecessary database hits and slower response times.
1️⃣3️⃣ Returning Big Payloads Without Compression
Large uncompressed responses consume more bandwidth and can slow down data transfer rates.
1️⃣4️⃣ Fat Controllers
Overloaded controllers with too much logic and methods become hard to maintain and test.
1️⃣5️⃣ Not using Minimal APIs
Controllers can quickly become out of order with too much logic inside.
P.S.: Minimal APIs are much faster in .NET 10
Did I miss anything in this list?
——
♻️ Repost to help others avoid Web API mistakes
➕ Follow me ( @AntonMartyniuk ) to improve your .NET Skills
📌 Save this post for future reference!
Christian Armand retweeted
“UUIDv7 for everything” is starting to sound like the new default.
I’m not sold.
UUIDv7 fixes a real database problem.
UUIDv4 is random, so inserts land all over the B-tree.
That means:
- Page splits
- Cache misses
- Write amplification
- Slower inserts as the table grows
UUIDv7 helps because it is time-ordered.
New rows mostly land near the end of the index.
Great.
But now your ID carries timestamp information.
That does not mean attackers can easily guess every future ID.
But it can reveal metadata:
Rough creation time
Relative ordering
Activity windows
Traffic spikes
Business volume patterns
That may be fine for internal systems.
It may be a problem for public APIs, invoices, orders, user URLs, or security-sensitive resources.
My rule:
- Use BIGINT when one database owns ID generation.
- Use UUIDv4 or NanoID when the ID is public and should stay opaque.
- Use UUIDv7, ULID, or KSUID when ordering and distributed generation matter.
And for many SaaS apps, the boring answer wins:
internal_id BIGINT PRIMARY KEY
public_id UUIDv4 UNIQUE
One ID for database performance.
One ID for public safety.
UUIDv7 is a good tool.
But “v7 for everything” turns a good default into lazy architecture.
Better IDs are still design decisions.
































