Je note deux remarques de Martin Fowler :
CQRS stands for Command Query Responsibility Segregation. It's a pattern that I first heard described by Greg Young. At its heart is the notion that you can use a different model to update information than the model you use to read information. For some situations, this separation can be valuable, but beware that for most systems CQRS adds risky complexity.
[...]
Despite these benefits, you should be very cautious about using CQRS. Many information systems fit well with the notion of an information base that is updated in the same way that it's read, adding CQRS to such a system can add significant complexity.
Je ne sais pas si vous avez remarqué, mais depuis 3-4 ans sur Paris, tous les SI migrent vers CQRS. J'ai encore une fois le sentiment qu'il s'agit d'une mode ou de quelque chose que les architectes pensent être une Silver Bullet.
Lien vers toutes les parties de l'article :
- https://www.artima.com/intv/testdriven.html
- https://www.artima.com/intv/testdriven2.html
- https://www.artima.com/intv/testdriven3.html
- https://www.artima.com/intv/testdriven4.html
L'extrait qu'il faut retenir :
Bill Venners: What is the unit in unit test? Define unit test.
Martin Fowler: That's very difficult. To a first approximation, it's a class. But as you work with unit tests more, you begin to realize you're testing little areas of responsibility, and that could be a part of a class or it could be several classes together.
Martin Fowler toujours aussi efficace dans ses explications.