Benjamin HEINTZ retweeted
Benjamin HEINTZ retweeted
CQRS = Separate read/write databases?
Not so fast! ❌
This isn't really what CQRS is about.
First, there was the CQS - Command-Query Separation principle.
Here's what CQS is:
- Commands change state, don't return data
- Queries don't change state, return data
- Queries should not have side effects
What? I can't return data from a command?!
Of course, you can - but the intent is different.
I'm not saying you shouldn't be pragmatic.
For example, you insert a new row into the database and return the ID. Perfectly fine.
But what about CQRS?
CQRS stands for Command-Query Responsibility Segregation.
It's an evolution of CQS and works on the architecture level.
Whereas CQS works on the method (or class) level.
It separates the code responsible for handling commands from the code for handling queries.
In other words, you have a logical separation of reads and writes.
You can also extend this with different logical data models.
Here are a few benefits you get with CQRS:
- Complexity management
- Scalability
- Flexibility
- Security
How did we begin associating CQRS with separate read/write databases?
This happens when you take the logical separation of commands and queries and elevate it to physical separation.
There are many flavors of this approach:
- Event sourcing + NoSQL
- SQL + NoSQL
- SQL + Redis
And while it has its benefits, like improving your job security, too much complexity can hurt your project.
So start simple. You can do CQRS with one database.
Apply logical separation of commands and queries.
Only add further complexity if you need to.
P.S. If you liked this, consider joining The .NET Weekly - my newsletter with 40,000+ engineers that teaches you how to improve at .NET and software architecture.
Subscribe here → milanjovanovic.tech/?utm_sou…
Would you use CQRS in your project, or do you view it as over-engineering?
Benjamin HEINTZ retweeted
You just need 8 lines of code to set up complete auth in your #dotnet 8 application! Let's see how to set this thing up!
Step-by-Step Guide. ⬇️⬇️
Benjamin HEINTZ retweeted
Exciting news!!
Android TV and tvOS support is coming soon to Avalonia, bringing cross-platform apps to even more screens! 📺
Benjamin HEINTZ retweeted
Version 8.0.0 of #npgsql and the #efcore provider for @PostgreSQL are out and available on nuget.org! So much exciting stuff that doesn't fit in a tweet - see the release notes (npgsql.org/doc/release-notes… and npgsql.org/efcore/release-no…), and let us know how it goes!
Benjamin HEINTZ retweeted
Together @Chilli_Cream @TheGuildDev and @wundergraphcom are joining forces to create a new open specification for distributed #graphql servers.
Have a look at what graphql-fusion is about 🙂
chillicream.com/blog/2023/08…
Benjamin HEINTZ retweeted
dotNET blog: Get Started with OpenAI Completions with .NET ift.tt/TL5WAnt
Benjamin HEINTZ retweeted
Get the power of Entity Framework Core Power Tools from the command line with the new CLI edition!
- map stored procedures and functions
- custom naming and pluralization
- t4 templates
- readme with custom getting started guide
- and much more
nuget.org/packages/ErikEJ.EF… #efcore #dotnet
Benjamin HEINTZ retweeted
I have blogged new article "How to make the fastest .NET Serializer with .NET 7 / C# 11, case of MemoryPack", If you are interested in writing high peformance C#, read on. #dotnet
neuecc.medium.com/how-to-mak…
Benjamin HEINTZ retweeted
Just realeased “Domain-Driven Design in 150 Seconds”. This was fun and challenging to create, so I’m very curios to hear what you think!
youtu.be/8Z5IAkWcnIw
#ddd #dotnet
Benjamin HEINTZ retweeted
Micro Frontends in Action With ASP .NET Core - Communication Patterns for Blazor WebAssembly Based Web Components by @tpeczek tpeczek.com/2022/09/micro-fr… #aspnetcore #blazor
Benjamin HEINTZ retweeted
Make engineering efforts valued and understood, not scrutinized!
By connecting engineering actions to company impact, Echoes helps communicate activity in a way anybody can understand.
echoeshq.com
Benjamin HEINTZ retweeted
Spectre.Console has joined the .NET Foundation! Spectre.Console is a .NET library that makes it easier to create beautiful console applications.
hubs.li/Q01kwxFT0 #dotnet #OSS #opensource
cc: @firstdrafthell
Benjamin HEINTZ retweeted
Blazor is pretty cool, but do you know what's cooler? The AWESOME Blazor song our friends @bucketsnboards created for us! We're stoked to share it with everyone - have a listen & don't be surprised if you start humming while working on your #Blazor app! #dotNET
Blazor - it's the latest craze, for sure!
Benjamin HEINTZ retweeted
Feature flags enable or disable a feature, or code path within an application. This @thepracticaldev post shows us how to implement a naive feature flag in #dotNET and then extend it to end up with a more robust solution.
Check it out: msft.it/6016bUkVI
Benjamin HEINTZ retweeted
Multi-tenant Apps With EF Core and ASP .NET Core by @buhakmeh blog.jetbrains.com/dotnet/20… #aspnetcore
Benjamin HEINTZ retweeted
👋 @gitlab community, with @farunty we've implemented a little tool (in bash 😅) to help transfer projects with 🐳 images in container registry from a group to another, as it's not possible yet in the UI.
🔗 It's available here 👉 gitlab.com/fun_with/fun-with…
Feedbacks are welcome🙌
Benjamin HEINTZ retweeted
‼️ Introducing .NET MAUI ‼️
One Codebase, Many Platforms
Now, you and 5 million+ other .NET devs have a first-class, cross-platform UI stack targeting Android, iOS, macOS, and Windows. You can build anything with .NET.
Get started today: msft.it/6011bRh1U
#dotNETMAUI
Benjamin HEINTZ retweeted
Keycloak 18 is out! keycloak.org/2022/04/keycloa…
Benjamin HEINTZ retweeted
How do we remove the "not cool" label from .NET?
For @ProtoActor, our .NET implementation is faster in all aspects versus the @golang version.
In mem message passing ~1.5x
Spawning actors ~2x
Network comm ~1.5x (gRPC streams)




























