Hacker News new | past | comments | ask | show | jobs | submit login

I think a large part of the next 10 years is us figuring out that frameworks are an anti-pattern and that everything is going to have to move to libraries that abide by CQRS.



Did not know what CQRS is, did some light googling[1]:

CQRS (Command and Query Responsibility Segregation) is an alternative to a simple CRUD-based database interface. CQRS separates reads and writes into different models, using commands to update data, and queries to read data.

    Commands should be task-based, rather than data centric. ("Book hotel room", not "set ReservationStatus to Reserved").
    Commands may be placed on a queue for asynchronous processing, rather than being processed synchronously.
    Queries never modify the database. A query returns a DTO that does not encapsulate any domain knowledge.
The models can then be isolated, as shown in the following diagram, although that's not an absolute requirement.

[1]


I really like this book on CQRS & ES: https://www.amazon.com/Practical-Microservices-Event-Driven-...

It’s a really practical treatment of CQRS & ES with JS examples. I had heard about CQRS & ES on HN for years but I had never seen any system that actually used it or any practical examples so this book is amazing cause it takes you through how to build a system using them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: