Laravel Command-Bus; When to use self-processing commands?

As you know, the command bus is implemented in laravel 5. and there are two ways to process commands in laravel 5.

  • Handler Processing
  • Processing by the team itself (self-processing teams)

What are the main differences between these methods? When to use self-processing commands and when to process commands with their respective command handler?

+7
php laravel laravel-5
source share
1 answer

This is another Laravel feature that really comes down to "it depends." If you were building a large enterprise application - they would like to separate the team from the handler - as this applies to SRP.

But for most of us, in most cases, a self-help team will be more than enough. I use self-service teams and I really like them.

This question has really been asked by Taylor Otwell and Jeffrey Way on twitter recently . Taylor Otwell himself said he needed a reason to not just use self-service teams.

Ross So also gave a deep understanding of this exact topic here , and it is worth reading a different perspective on why not use them.

+5
source share

All Articles