liveBook · Manning

Port

A port is a defined point of connection through which a system or component communicates with another system, service, or component.

How 6 Manning books explain it

Grokking Software Architecture

A port is an application-facing interface in hexagonal architecture that defines operations used to interact with the application core.

How it is used
Protects business logic from outside technologies by defining the application's interaction boundaries.
How deep it goes
Explains driving and driven ports, adapter wiring, testing, design pitfalls, and migration; defers detailed external API design.
Examples
Uses order service and repository interfaces, a server alert port with fake adapter, and a crypto portfolio refactoring exercise.
What you can do after
Apply ports to separate core logic from external dependencies and test behavior with fake adapters.

Read how Grokking Software Architecture explains port →

AI-Powered Developer: Build software with ChatGPT and Copilot

A port is an interface defining a contract between an application’s domain model and an external system.

How it is used
Separates a REST API from AssetManager through an interface and delegating adapter.
How deep it goes
Defines port roles and works through an abstract CRUD interface, adapter implementation, and controller update.
Examples
Uses an IT asset-management REST controller, AssetRestPort, AssetRestAdapter, and CRUD asset operations.
What you can do after
Build it from scratch by defining a port, implementing an adapter, and redirecting controller calls through it.

Read how AI-Powered Developer: Build software with ChatGPT and Copilot explains port →

Grokking AI Applications

A port is a typed connector on a workflow component through which data, models, variables, or other resources enter or leave the component.

How it is used
Connects workflow components into processes that pass data, models, variables, and other resources between stages.
How deep it goes
Explains port direction, color-coded data types, linked parameters, and practical drag-and-drop connections.
Examples
Uses a Chat Input-to-OpenAI connection and a KNIME node anatomy diagram to demonstrate port usage.
What you can do after
Operate/configure workflows by identifying compatible ports and connecting component outputs to downstream inputs.

Read how Grokking AI Applications explains port →

Clean Applications with Hexagonal Architecture

An application boundary interface through which external actors or technologies interact with the application core.

How it is used
Defines core-owned interaction boundaries that protect business logic from external technology changes.
How deep it goes
Explains input and output responsibilities, dependency direction, Java interfaces, and incremental migration steps.
Examples
Uses article creation, a JPA repository adapter, and REST and Kafka entry points to illustrate port roles and reuse.
What you can do after
Apply ports by extracting core interfaces, refactoring handlers, wrapping existing infrastructure, and testing boundaries.

Read how Clean Applications with Hexagonal Architecture explains port →

Acing the Frontend Interview

A port is an interface defining a communication boundary through which an application exposes capabilities or accesses an external dependency.

How it is used
Frames communication boundaries between application capabilities, architectural layers, and external services.
How deep it goes
Defines ports and names inbound and outbound forms, then demonstrates adjacent proxy mechanics without detailing port implementation.
Examples
Uses a React fetch call, Vite proxy configuration, Express CORS headers, and curl preflight output.
What you can do after
Apply it via a named tool or library by explaining and configuring Vite proxy communication between frontend and external API.

Read how Acing the Frontend Interview explains port →

gRPC Microservices in Go

A network port is a numbered communication endpoint that identifies a service or process on a networked host.

How it is used
Defines contracts between an Order service’s business logic and its incoming requests or outgoing dependencies.
How deep it goes
Works through Go interface signatures, adapter placement, and startup wiring; does not examine network-port protocol internals.
Examples
Uses PlaceOrder, database Get and Save contracts, and a payment Charge contract in an Order service.
What you can do after
Build it from scratch as Go interfaces, inject matching adapters, and substitute mocks when testing dependent operations.

Read how gRPC Microservices in Go explains port →

Also covered in

What to know first

Related concepts

Questions about port

What is port?

A port is a defined point of connection through which a system or component communicates with another system, service, or component.

Which Manning books explain port?

Grokking Software Architecture, AI-Powered Developer: Build software with ChatGPT and Copilot, Grokking AI Applications, Clean Applications with Hexagonal Architecture, Acing the Frontend Interview and gRPC Microservices in Go.

What should I know before learning port?

Manning books that teach port usually introduce interface, business logic, dependency injection and domain model first.

What kinds of port are there?

Kinds of port include primary port.

What is port a kind of?

Port is a kind of interface. An interface is a contract or boundary that specifies the operations, members, or data shape a type or component exposes, without prescribing its complete implementation.

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.