Command Query Separation (CQS) | Code Walks 025

  Рет қаралды 7,057

Christopher Okhravi

Christopher Okhravi

Күн бұрын

Command Query Separation (CQS) argues that we should separate methods that perform commands from methods that perform queries. In other words, we should separate methods that return values from methods that mutate state.
GEAR USED
► CAMERA: Canon 70D amzn.to/29wR8wG
► LENS: Canon 10-18mm amzn.to/29srabL
► TRIPOD: JOBY Gorillapod Zoom amzn.to/29AdkHT

Пікірлер: 11
@JohnMcclaned
@JohnMcclaned 7 ай бұрын
Commands can and should return a result. Specifically for when you are not asking a question, but observing the result of the state change. (like errors or new entity ids) status codes even prove this, they implicitly break the hard "cqs" model because a 200 is technically a response and it means something changed and worked.
@ades3967
@ades3967 7 жыл бұрын
I was having this same battle in my head today (all the edge cases), where you just bite the bullet and make the exception. Your videos are truly amazing.
@samoniumuziejus
@samoniumuziejus 2 ай бұрын
Its fine you seperate the concerns, but if you need both you inject both, still the software is broken into smaller bits and pieces, which is the goal mostly
@stuknowlton160
@stuknowlton160 3 жыл бұрын
@chris, your videos are incredible. I am really grateful for all the knowledge you share. I am constantly referencing your videos at work. Your explanations of patterns and principles is second to none. I can't thank you enough & I eagerly await your next oop video. thanks!
@mithunmanoharmithun
@mithunmanoharmithun Жыл бұрын
awesome explaination..!
@aleksandrsavvopulo4510
@aleksandrsavvopulo4510 2 жыл бұрын
So “public User createUser(arts)” violates this principle?
@TonyByng
@TonyByng 6 жыл бұрын
Not so much a code 'walk' now 😁
@robersonmendes1260
@robersonmendes1260 3 жыл бұрын
I don't know if you already have a video about, but I miss some example of this concept with command classes and something like this. In my recent job, I found these xxxCommand objects and just don't know nothing about, so here I am
@chrisjust7445
@chrisjust7445 7 жыл бұрын
What are you riding on in these videos? It sounds like an electric bike, but it looks like you're standing.
@sanjivkumar2462
@sanjivkumar2462 2 жыл бұрын
Very nice video. Clear explanation of CQS. I was curious where are you located. Place looks beautiful.
@rajusrinivasan8820
@rajusrinivasan8820 3 жыл бұрын
When you do video driving more interesting then in a room.
Sliming in TDD (Fake it 'til you make it) | Code Walks 024
4:54
Christopher Okhravi
Рет қаралды 1,8 М.
Rewrite or Reuse? | Code Walks 001
16:23
Christopher Okhravi
Рет қаралды 4,4 М.
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 29 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 43 МЛН
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 22 МЛН
How to CQS: splitting the Read from the Write
11:52
Bran van der Meer
Рет қаралды 1 М.
Proxy vs Adapter vs Facade Pattern | Code Walks 012
10:47
Christopher Okhravi
Рет қаралды 7 М.
CQS and CQRS: Command Query Responsibility Segregation
4:16
Drawing Boxes
Рет қаралды 20 М.
Covariance and Contravariance
13:31
Christopher Okhravi
Рет қаралды 11 М.
Law of Demeter | Code Walks 014
7:23
Christopher Okhravi
Рет қаралды 10 М.
Чистый код / Clean Code #6: SoC, CQS, PoLA
12:36
EngineerSpock - IT & программирование
Рет қаралды 4,4 М.
Statics are Globals | Code Walks 002
18:04
Christopher Okhravi
Рет қаралды 6 М.
Code like prose | Code Walks 013
6:10
Christopher Okhravi
Рет қаралды 4,1 М.