In DDD and CQRS, for Read queries, what is a strategy that allows for interfaces and easy testing?
问题 I'm using PHP/MySQL... I'm using interfaces for repositories on my Domain "command" side. This is going well. But I'm stuck on what to do on the "queries" (read) side. Do I make queries each as separate methods grouped in classes by some common similarity I find? Or do I make each query its own class? How should I go about using interfaces to make testing (and easier replacement later)? Some places I've researched: A github php example An attempt to find the best decoupled approach to the