PrismaPhonic / domain_patterns

Repo that holds both domain_patterns and domain_derive library crates
MIT License
26 stars 5 forks source link

Example uses of domain_pattern traits? #1

Open seanpianka opened 4 years ago

seanpianka commented 4 years ago

Hi @PrismaPhonic and thanks for your work on this project!

Is there any chance you could add simple example usages of the traits provided by domain_patterns? I am attempting to apply it to my DDD-with-CQRS-but-no-event-sourcing, and using the commands and handler traits is a bit tough to wrap my head around.

pukeko37 commented 4 years ago

I agree, there is a need for more explanation in the rustdocs.

I have found the test code in the github repository is a great way to see how it all fits together. Perhaps some of this example code could be added to the rustdocs.

But I think @seanpianka hints at a more holistic need. It would be good to add a bit of text presenting the context, and perhaps a few links to DDD resources.

My interest in the domain_patterns is not to implement a fully fledged DDD - that would be overkill. But I use the repository framework, event sourcing and domain entities. It works fine for that.

PrismaPhonic commented 4 years ago

Sure, I intended for the tests to illustrate that, but I can include more of that into the rust docs. Will get to it this week @seanpianka.

leesiongchan commented 4 years ago

@PrismaPhonic It would be super helpful if you could also complete https://github.com/PrismaPhonic/domain_patterns/blob/master/domain_patterns/tests/common/models.rs#L67 part and the use of Applier.