Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Handler+Service tutorial to documentation.md #86

Closed
6 tasks done
bartelink opened this issue Jan 17, 2019 · 1 comment
Closed
6 tasks done

Add Handler+Service tutorial to documentation.md #86

bartelink opened this issue Jan 17, 2019 · 1 comment
Assignees

Comments

@bartelink
Copy link
Collaborator

bartelink commented Jan 17, 2019

Atm, Todo.fs and Aggregate.fs are the only real examples (aside from the samples/ folder) of what one might do to connect the basic domain logic to a running app.

Documenting the sort of things you put into the Handler and/or Service and how to balance that is a key piece of documentation that's been pointed out as missing....

Patterns to be covered:

  • Command with no response with straight call in Service (todo does this)
  • Command with decision result from Interpret function feeding out (don't think that's covered either here or in the Equinox /samples folder)
  • Command with projection from final folded result post command application (todo does this)
  • Query (see todo and aggregate)

General advice on what to do that the tutorial should cover:

  • there's definitely more - the tutorial should also mention some general concepts around CQRS and provide advice beyond "here are 11 techniques, you fail if you on't use at least 9 of them"
  • address the key point is that one size does not fit all and its important that the Handler and Service be well thought through
    • if you end up cut and pasting exactly the same one as boilerplate per aggregate its a bad sign
    • if you end up using more than 2-3 of the techniques above, that's also a bad sign

Deferred:

  • Command calling out to external decision process (e.g. if a decision process needs to examine the folded state, then propose a relevant command and/or have a longer chain of calls which you want to wrap an optimistic retry loop around)
    • There are Async overloads for prominent functions which result from specific cases in existing codebase. They will not be documented in Add Commands and Handlers Tutorial #96 as they don't constitute best practice worth highlighting (@eiriktsarpalis argues for removal of such temptations from the house entirely; for now they remain)
@bartelink
Copy link
Collaborator Author

Ping @Xatter would love feedback on #96 - its on the long side; I'd be keen to hear if you feel it addresses the reasons that led to your +1

I'm going to close this for now, but please feel free to log a "there's no docs for aspect X" or "docs should have guidance for how to think about well known design tradeoff X when using Equinox" issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant