Conceptualized by Alistair Cockburn initially under the name "Ports and Adapters".
In a nutshell:
Application Driver -> Primary Adapter -> Primary Port -> Use Case -> Secondary Port -> Secondary Adapter -> External System/Side Effect
They define the business rules and they should not depend on code related on how the system communicates with the outside world. Throught the use of Ports and Adapters the Use Cases can be reliably tested and change mainly if the business rules change
They expose the ways in which the use cases can be reached (primary) or reach to (secundary) to the outside world. They are technology agnostic.
They deal with the code that communicates outside of the system.
Based on talks by Jakub Nabrdalik such as https://www.youtube.com/watch?v=2vEoL3Irgiw
Based on Jakub Nabrdalik's talks About Hexagonal Architecture and TDD.
(*) In the following example I decided to move customerconsole package outside of the customer module because it required it's own module configuration. However there is nothing stopping that package to remain as a folder inside of com.abc.project.customer
https://gist.github.com/corlaez/aa2c1a657438f5c998af9340a3339051





