11 Matching Annotations
  1. May 2025
  2. Apr 2025
    1. 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.

    2. 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!

  3. Mar 2025
    1. 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.

    2. 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.

    3. 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.

    4. 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.