I’ve been looking at “ports & adapters” examples on GitHub this morning … does anybody have one where all interfaces/classes are NOT public?
5
2
3
@simonbrown in Java they have to be, because *something else* is responsible for composing app from domain, adaptors and technical libs
2
1
@natpryce not necessarily … Spring will instantiate package-protected classes, for example /cc @olivergierke
1
@simonbrown it does so by calling setAccessible(true), thereby violating module boundaries.
6
@natpryce all types being public means that ports & adapters is really no different from a good layered architecture
1
1
@simonbrown in a layered architecture, static and dynamic relationships are (usually) the same. In P&A, they are different
2
2
@natpryce Objects that fulfill a compile-time contract with data flowing in the other direction at runtime are very common in layered arch
Apr 24, 2016 · 1:00 PM UTC


