Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

benefits of hexagonal architecture

Pragya Keshap answered on February 28, 2023 Popularity 3/10 Helpfulness 2/10

Contents


More Related Answers

  • advantages of hexagonal pattern
  • HEXAGONAL architecturre

  • benefits of hexagonal architecture

    0

    In the Hexagonal pattern there are the following 3 concepts:

    1. Ports: These are basically java interfaces that define the communication contract.

    2. Adapters: They are the implementation of the Ports

    3. Domain: This is the central part which contains all the business logic for processing data according to business rules. Ports are defined within domain, while adapters are defined outside domain.

    Advantages of Pattern

    Agnostic to the outside world

    The first big benefit of Hexagonal Architecture is the fact that your application is now agnostic to the outside world. Typically a web application will be driven by HTTP requests through a browser. However, because the inner core does not know anything about the outer layers, the application can essentially be driven by any number of different controls.

    Easier to test in isolation

    Now that your application is agnostic to the outside world, it is much easier to test in isolation. This means instead of sending in HTTP requests, or making requests to a database, you can simply test each layer of your application, mocking any dependencies.

    The Ports and Adapters are replaceable

    The role of the Ports and Adapters is to convert requests and responses as they come and go from the outside world. This conversion process allows the application to receive requests and send responses to any number of outside technologies without having to know anything of the outside world.

    Popularity 3/10 Helpfulness 2/10 Language typescript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 28 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.