hexagonalThis
A simple kata to live-code with Alistair about Hexagonal Architecture
Steps (carpaccio style)
- Test drive the design of the business-logic API (domain). This first version of the business logic returns an hard-coded result.
- Write another acceptance test mocking a right-side adapter this time (repository/service provider) to improve the business-logic which now is using it (instead of providing hard-coded values).
- Write another acceptance test to test-drive the usage of a real left-side (ClI) adapter in the process. Introduce here an "hexagon" wrapper onto the business logic (to explicit the architectural pattern for the years to come ;-)
- Write a ClI CONSOLE application (embedding the right-side mock) to get end-users feedbacks about the way we will soon ask questions to the system
- Test drive a real right-side adapter (eg. An external service provider or a file adapter)
- Test drive a JSON (left side) Adapter through an acceptance test
- Plug the whole set into a Web API and deliver it to gather end-users feedbacks
- Add other ports and adapters depending on what wants the audience (e.g.: monitoring probe, a database repository, other service providers)