liveBook · Manning

Primary port

A primary port is an application interface through which external actors or systems invoke the application’s operations or use cases.

How 2 Manning books explain it

Clean Applications with Hexagonal Architecture

An interface exposing an application operation that an external caller can invoke.

How it is used
Defines the core-owned public API through which external adapters invoke application capabilities.
How deep it goes
Develops interface contracts, handler implementation, typed failures, module placement, and automated interface checks.
Examples
Uses article creation and publishing, including a handler that reads, publishes, and saves an article.
What you can do after
Builds use-case interfaces and handlers with explicit typed errors and enforceable port boundaries.

Read how Clean Applications with Hexagonal Architecture explains primary port →

Grokking Software Architecture

An interface through which an external actor invokes an application's core functionality.

How it is used
Defines the application's callable operations for users, tests, and external systems entering through driving adapters.
How deep it goes
Defines ports as interfaces and illustrates order-service operations, but does not detail implementation or method design.
Examples
Uses IOrderService.PlaceOrder() and CancelOrder(), called by an OrderController after translating an HTTP request.
What you can do after
Apply it by defining an interface for application actions and having a driving adapter call it.

Read how Grokking Software Architecture explains primary port →

Also covered in

What to know first

Related concepts

Questions about primary port

What is primary port?

A primary port is an application interface through which external actors or systems invoke the application’s operations or use cases.

Which Manning books explain primary port?

Clean Applications with Hexagonal Architecture and Grokking Software Architecture.

What should I know before learning primary port?

Manning books that teach primary port usually introduce interface, layered architecture, business logic and separation of concerns first.

What is the difference between primary port and outbound port?

A primary port is an application interface through which external actors or systems invoke the application’s operations or use cases. An outbound port is an application-facing interface that declares a service or resource the application requires from an external provider.

What is primary port a kind of?

Primary port is a kind of command handler. A command handler is a software component that receives and processes commands representing requested application actions or state changes.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.