Availability
Sometimes Traceability is added making it CIA-T. In this page Auditing is used for Traceability
Availability
Sometimes Traceability is added making it CIA-T. In this page Auditing is used for Traceability
it’s independent of the business processes that trigger that logic, they are independent and completely unaware of the Application Layer.
"it’s independent of the business processes that trigger that logic, they are independent and completely unaware of the Application Layer." It still bothers me calling whatever happens to be in an application service "business process"! It should be called IMHO application process a process that is part of the application not the business. Application process of course mostly make calls to business processes but they do more stuff such as calling out adapters through ports. So it is gluing business to adapters making business processes work in an application.
The Application Services and/or Command Handlers contain the logic to unfold a use case, a business process. Typically, their role is to:
That's how the application works through application services!
it is of utmost importance that the Ports are created to fit the Application Core needs and not simply mimic the tools APIs.
Great importance!
The term “port and adapters” picks up the ‘’purposes’’ of the parts of the drawing. A port identifies a purposeful conversation. There will typically be multiple adapters for any one port, for various technologies that may plug into that port. Typically, these might include a phone answering machine, a human voice, a touch-tone phone, a graphical human interface, a test harness, a batch driver, an http interface, a direct program-to-program interface, a mock (in-memory) database, a real database (perhaps different databases for development, test, and real use).
Another paragraph to give examples for port and adapter relationship.
The hexagon is not a hexagon because the number six is important, but rather to allow the people doing the drawing to have room to insert ports and adapters as they need, not being constrained by a one-dimensional layered drawing. The term ‘’hexagonal architecture’’ comes from this visual effect.
Why it is called hexagon.
The rule to obey is that code pertaining to the ‘’inside’’ part should not leak into the ‘’outside’’ part.
Solution as a rule to follow!
The hexagonal, or ports and adapters, architecture solves these problems by noting the symmetry in the situation: there is an application on the inside communicating over some number of ports with things on the outside. The items outside the application can be dealt with symmetrically.
Solution is about the symmetry among inside and outside.
On another side of the application, the application communicates with an external entity to get data. The protocol is typically a database protocol. From the application’s perspective, if the database is moved from a SQL database to a flat file or any other kind of database, the conversation across the API should not change. Additional adapters for the same port thus include an SQL adapter, a flat file adapter, and most importantly, an adapter to a “mock” database, one that sits in memory and doesn’t depend on the presence of the real database at all.
How to put port-adapter structure into use. Some example use cases.
The protocol takes the form of an application program interface (API).
Part is the API provided by the application itself.