liveBook · Manning

Business logic

As explained in Microservices Patterns, Second Edition

Business logic consists of the rules and computations that implement an application's domain behavior.

Business logic is the core of an application’s domain behavior: it contains the rules and computations that act on domain objects. In hexagonal architecture, adapters handle interaction with the outside world while the business logic remains independent of them. section 2.1.1 section 3.3.2

In a hexagonal design, the boundary is organized around ports and adapters:

  • Inbound ports expose operations that outside applications can invoke; inbound adapters, such as web controllers or message clients, route requests to them. section 3.3.2
  • Outbound ports define how the business logic requests external services; outbound adapters implement them, for example with database access or remote-service clients. section 3.3.2

FTGO

FTGO organizes domain behavior into modules such as Order Management, Delivery Management, Billing, and Payments. In Order Management, the domain interacts with Consumer Management to verify consumers and Delivery Management to schedule deliveries. section 2.1.1 section 3.2.1

Figure 3.16 An example of a hexagonal architecture, which consists of the business logic and one or more adapters that communicate with external systems. The business logic has one or more ports. Inbound adapters, which handles requests from external systems, invoke an inbound port. An outbound adapter implements an outbound port and invokes an external system.
Hexagonal architecture

Use the diagram to see how inbound and outbound adapters connect external systems to the business logic through ports. section 3.3.2

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines the boundary through ports and adapters, but does not detail the domain computations themselves.
Examples
Uses FTGO modules for orders, delivery, billing, and payments, plus consumer verification and courier delivery scheduling.
What you can do after
Understand how ports and adapters keep business logic independent of external systems.
How it connects
Connects business logic to domain objects, subdomains, ports, adapters, and hexagonal architecture.

Also explained in

Compare how 15 books explain business logic →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.