Closed nealio82 closed 8 years ago
First of all, thanks again to take the time to open an issue. In fact, the part of the chapter you're referring to, it's only an overview of the most important architectural styles. It's out of the scope of the chapter to dig in this details. Anyway you can find a working example at the gamify application (a full-blown event driven application powered by an evensourced engine) used on the Integrating bounded contexts chapter.
And example projections at
Cheers.
Ok, thanks. However I think it's confusing, as everything leading up to this is covered with code examples, but fetching the application state at any given moment isn't.
The previous section (2.4.1) gives a comprehensive code example of the write model and leads the reader into assuming there will be a working example of the read model and of write model projections. And the quote here reinforces the assumption:
An important feature of this architectural style is that the read model should be completely disposable since the true state of the application is handled by the write model. This means the read model can be removed and recreated when needed using write model projections.
The italicising of "write model projections" gives the impression it is a concept which will be explored deeper
OK. I see your point. I've read again the chapter and I agree that adding a projection example can clarify things up. I'll add one.
We may add a chapter to the appendix just to talk about CQRS and ES. I think that would be the proper place to explain those architectural styles in more detail.
Thanks again!
I agree that a chapter at the end is a good idea. For me it's a natural extension of DDD and should be advocated as much as possible. I've found it very hard to find useful examples of CQRS/ES in PHP online so sections 2.4 (Command Query Responsibility Segregation) & 2.5 (Event Sourcing) made me very excited.
Sorry for the delay. I have added a more detailed example of write model projections. The book is now being generated with the new content and you should receive an e-mail shortly. Thanks again.
$projector = new Projector();
Neither
Projector
norInfrastructure\Projection\Elasticsearch...
can be found in the book's text. The reader can't implement a projection of their application state without doing a fair amount of external research. To get a working implementation I had to inspect / use an example of Proophessor's projections