Behaviour-Driven Development in practice
Behaviour-Driven Development (BDD) is a software development process. As the name implies, it is based on the idea that the expected behavior of a system is defined before the source code for that system is written.
The behavior is documented in the form of a suit of tests that can be executed to validate how the system responds to a set of examples that cover the use cases of that system.
Design your events granularity
What events should my component publish? Not always an easy question to answer.
Software design is a continuous task. You never finish a software project, because it needs to evolve as the team’s knowledge about the problem it solves grows. This is why one of the principal characteristics of good software is being easy to change.
In an asynchronous software architecture, the events that a component publishes define its contract with the other components in the system. And a good interface contract is one that lets the component be useful to the other components, while making it easy enough to modify as the project grows.