Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Event driven development example
- In this example, we have a dog and a human.
- * When the human feeds the dog; it eats, poops and barks.
- * When the dog poops, the human cleans.
- When we use events to trigger actions, we can remove a direct dependency between all the components. It doesn't make sense that the Dog class needs a dependency on the Human and the Human class should not care about the Dog class. Also if we want to monitor all the action, we don't want to clutter the classes with a non business related logic.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement