
9: Decomposing models with Maciej Kaszubowski
Thinking Elixir Podcast
00:00
How to Identify Event Handlers in a System
The first thing I would look for is any field on your model that is called state or status because it often indicates that your model has multiple lifecycles in it. And then the moment of changing the state is often connected to some kind of domain event. Another one is to analyze how people use the system you are working on and trying to find places when your model changes the actor it's interacting with. So by looking at that communication between people, you can really get a lot of insight on how to design your system. Using a transaction and using synchronous handlers is probably the easiest and simpler way to go.
Transcript
Play full episode