Hi,
I created the issue: https://issues.apache.org/jira/browse/JAMES-3190 > I was told [1] that James has a hexogonal architecture [2]. However, that is > not at all apparent neither in the documentation, nor in the code itself. > If this is truly the fundamental concept of the system design, then for > developers to understand the system more easily it ought to be made more > explicit in the code, in one way or another (or in as many ways as reasonably > possible). [1] https://www.mail-archive.com/server-dev@james.apache.org/msg65809.html [2] https://alistair.cockburn.us/hexagonal-architecture/ The discussion I wanted to have here is about what should be done about this. The email discussion was the only place that I have found so far where this is discussed. If it is such a fundamental concept, it really ought to be better captured. First, I think it would be good to get agreement about what is: * Core * Port * Adapter * External Device If we can reach agreement on a definition for each of these, then we can determine (1) how to document the concepts, and (2) if the code should be refactored to better reflect these concepts. I will give it a go initially based on [2]. Core ------------------------------- The core represents the business logic. It is what in Domain-Driven Design is called the “core domain”. * Examples: - a Mailbox - a Mailbox admin (to create, rename, remove… a Mailbox) - a Mailbox Repository (to use the DDD concept, for providing persistence / storage) Port ------------------------------- The interface (in java) between the core and anything outside the core. * Examples: - the java API of the Mailbox admin - the java API of the Mailbox Repository Note that all External Devices would use the SAME ports. There is no specific port for a given technology. Adapter ------------------------------- A technology-specific implementation that has for its sole purpose the translation of a port into a specific technology. * Examples: - a CLI for providing command-line access to the Mailbox admin API - a REST interface for providing HTTP access to the Mailbox admin API - a JDBC implementation of the Mailbox Repository External Device ------------------------------- Anything outside of the core that interacts with the core via a port. * Examples: - A GUI for providing a means of administering Mailboxes - A Derby implementation that implements the Mailbox Repository via the JDBC Adapter Very short and sweet. Any comments? Cheers, =David --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org