envato / event_sourcery

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

Stringify event body #42

Closed mjward closed 8 years ago

mjward commented 8 years ago

In light of discussion with @vonconrad and @stevehodgkiss the Event should be forcing consistent access of keys at the time of accepting the body hash.

Note: This more than likely requires changes in Identity

mjward commented 8 years ago

Didn't notice EventBodySerializer present, must have just been merged. Is this more what you had in mind @stevehodgkiss ?

Talking with @orien, we feel the naming of this class/method is a little bit off seeing now as its used when both persisting and reading (apply_events when loading aggregate) from the database. It also feels awkward to call serialize on something and then read from it before its persisted.

Would normalize/normalizer?

stevehodgkiss commented 8 years ago

Yeah normaliser sounds like a more appropriate name

orien commented 8 years ago

+1 To the change as is. If we can agree on a more appropriate name it can be changed in a dedicated PR.