Hey man, I'm here from Brazil, I've been working with PHP code since 2007. Your passion about programming and focus on PHP has been a refresh in my love and motivation for this science and art, Thanks
@jean-marcstrauven2990
8 ай бұрын
Please, make a article or show a exemple..it's really interesting.
@phpannotated
8 ай бұрын
I'm drafting a blog post about it as well :)
@batlin
4 ай бұрын
As soon as you described them, I was thinking "this is going to be much more testable", since you have a flatter hierarchy with less direct dependencies. Reminds me a bit of Smalltalk's late binding and the Lua-based game engine Defold's message system -- instead of having a complicated and brittle web of direct dependencies, scripts just broadcast messages and listen for ones they care about.
@Gexsi0
8 ай бұрын
I think you should also mention one more benefit. Your commands can be executed synchronously or asynchronously.
@phpannotated
8 ай бұрын
True, thanks for pointing that out! I actually thought I mentioned it briefly, but I cut that part out last minute 😬
@bambamboole1
8 ай бұрын
It’s a very powerful pattern, when you get used to not return stuff from the handlers. Then all of the commands can be easily queued. Connect it via events with websockets to the frontend again and it feels like a super power.
@turboclown
8 ай бұрын
This is very interesting, I hope you'll give some examples in your blog or even open source the code you wrote. I'd love to learn.
@phpannotated
8 ай бұрын
I plan on writing a post about it as well soon :)
@metaphoricallyspeaking
8 ай бұрын
It's great to hear someone talking so positively about introducing a Command Bus - the benefits are incredible. I'd still use one if I was building a blog, btw! :)
@jelmerprins
8 ай бұрын
As a big fan of command busses and the number 1 on the leaderboard of the game, thank you :D I am a bit sad that i have to adjust my deck since something got fixed that was apparently a bug, but the game is still a lot of fun. I would disagree on the crud app though, but maybe that is a symfony vs laravel thing. I also find it useful for crud and with a maker I can easily generate most of the code
@Aerendir
8 ай бұрын
Can you explain better what do you mean with “with a maker I can easily generate most of the code”? 🙏🏻
@Plytys
8 ай бұрын
Would like to see an example how you refactor some piece of code to command bus.
@phpannotated
8 ай бұрын
Very nice idea! I might do a livestream about it soon :)
@Alpheus2
8 ай бұрын
@@phpannotated Happy to pair on stream if you want some backup on the refactor plus discussion.
@jonashansen2512
8 ай бұрын
A little bit of CQRS goes a long way 😊
@AlexMerlin1985
8 ай бұрын
4:44 That missing closing parenthesis after the call to command, though... :)
@phpannotated
8 ай бұрын
Oh oh 😳
@xiCO2k
8 ай бұрын
Next refactor should be change from PHPUnit to Pest 🌶
@anupam.sam9
8 ай бұрын
Can you link your project in the description for better understanding of the full implementation...?
@phpannotated
8 ай бұрын
It's not open source at the moment. But I will do some livestreams about it in the future :)
@wildfoster
8 ай бұрын
Command bus? Is it like a list of class object, grouped together to be dispatched somewhere else? I am kinda confused here
@BrunoBernard-kn6vt
4 ай бұрын
Please share the repo
@robwatson826
8 ай бұрын
I love a command bus. Glad you've seen the light! Interested to know how you handle situations where the command changes some data and you want to send that data back to the client? Do you just make a new query to fetch the updated data? Or do you leave that up to the client to make another request for it?
@phpannotated
8 ай бұрын
If you follow CQRS, then commands and querying are indeed two concernes that are fully separated. That means no returning from handlers directly. It means that after having dispatched a command, you'll have to re-query the read model manually. I briefly mentioned it in the video, but it's a super interesting topic that's probably worth some content on its own.
@roky2822
8 ай бұрын
@@phpannotated can you recommend good information sources about CQRS. I can google myself sure, but I'm interested which sources would you personally recommend?
@phpannotated
8 ай бұрын
@@roky2822 I once wrote a blog post where I bundled the talks that got me started, it's a good entry point :) stitcher.io/blog/my-journey-into-event-sourcing If you want to learn more, Greg Young's talks are excellent :)
@NedumEze
8 ай бұрын
Never heard of 'Command Boss'. Is it your invention? Any plans for literature or articles on it?
@phpannotated
8 ай бұрын
😂
@Hatecultist
8 ай бұрын
Little suggestion for the audio: I think a DeHesser is needed
@phpannotated
8 ай бұрын
Good point, I think it's because I was sick while recording and not breathing properly. I actually have a deesser enabled, but I should have tweaked it some more for this video.
Пікірлер: 32