envato / event_sourcery

A library for building event sourced applications in Ruby
MIT License
84 stars 10 forks source link

Support for custom event classes + improved ESP and AggregateRoot event handling DSL's #93

Closed stevehodgkiss closed 7 years ago

stevehodgkiss commented 7 years ago

Adds the ability to use custom event classes like in @andrewgr's presentation (ItemAdded = Class.new(EventSourcery::Event)) with backwards compatibility support for storing event types in different ways (underscored for example).

The ESP's are backwards compatible with the old method name dispatch mechanism. In a future release this will be removed (to allow a time period for upgrading apps).

Interested in feedback on how the event type serialisation works. As you can see from the commits I've switched approaches a few times already.

stevehodgkiss commented 7 years ago

An example of this PR in Identity here https://github.com/envato/identity/pull/807

twe4ked commented 7 years ago

This is looking awesome! Really excited for the next release. 👏

stevehodgkiss commented 7 years ago

@grassdog @andrewgr @vonconrad waiting for some more feedback / +1's to move forward with this.