liveBook · Manning

Adapter

An adapter is a software component that translates between interfaces or representations so otherwise incompatible components can work together.

How 17 Manning books explain it

Clean Applications with Hexagonal Architecture

An adapter that connects an application to an external service through an API.

How it is used
Contains external technology details behind core-defined ports to limit change propagation into business logic.
How deep it goes
Develops adapter responsibilities, dependency direction, assembly, migration, and dependency-specific testing.
Examples
Uses REST controllers, a JPA article repository, an external author API adapter, and a notification fake.
What you can do after
Builds adapters from scratch, wires them to ports, and tests their boundary behavior with dependency-appropriate techniques.

Read how Clean Applications with Hexagonal Architecture explains adapter →

Acing the Frontend Interview

An adapter is a component that translates between an application port and a concrete external interface or infrastructure mechanism.

How it is used
Separates React data access or core business logic from concrete APIs, delivery mechanisms, and infrastructure.
How deep it goes
Works through frontend and domain-refactoring examples, distinguishing driving from driven adapters without specifying a full implementation for each port.
Examples
Uses a React user-data adapter and a user-management refactor with web, CLI, API, database, authentication, and notification adapters.
What you can do after
Build it from scratch: place an adapter between components or domain ports and concrete services so implementations can be tested or replaced.

Read how Acing the Frontend Interview explains adapter →

Grokking Software Architecture

A component in hexagonal architecture that connects a port to an external system or technology.

How it is used
Uses adapters to protect business logic from external technologies and connect both incoming requests and outgoing infrastructure.
How deep it goes
Works through adapter direction, dependency inversion, implementation, wiring, testing, pitfalls, and migration; defers detailed event-driven architecture.
Examples
Illustrates adapters with USB devices, HTTP controllers, SQL repositories, alert services, and a fake alert adapter.
What you can do after
Build adapters from scratch, inject them into a core, and test behavior with a fake implementation.

Read how Grokking Software Architecture explains adapter →

Designing AI Systems

The adapter pattern is a design pattern that translates one interface into another interface expected by clients.

How it is used
Provides stable model-provider and tool interfaces while isolating applications from external API differences.
How deep it goes
Defines a shared interface and translation responsibilities, then walks through an implementation excerpt rather than a complete provider adapter.
Examples
Uses Anthropic message translation and an Epic appointment adapter with OAuth and FHIR to illustrate provider and tool boundaries.
What you can do after
Evaluate/understand how to structure adapters that translate requests and responses across provider or external-system boundaries.

Read how Designing AI Systems explains adapter →

gRPC Microservices in Go

An adapter is a boundary component that transforms requests between an external actor or technology and an application's internal interfaces.

How it is used
Isolates microservice business logic from incoming interfaces and external systems by translating requests across ports.
How deep it goes
Works through port contracts, a GORM-backed database adapter, and startup wiring rather than stopping at the pattern definition.
Examples
Uses an Order service's GORM/MySQL persistence adapter, gRPC entry point, and payment-service adapter.
What you can do after
Build it from scratch by implementing a port contract in an adapter and injecting that adapter into a Go service.

Read how gRPC Microservices in Go explains adapter →

Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

An adapter pattern converts one interface into another interface expected by clients so incompatible components can work together.

How it is used
Maps provider-neutral infrastructure metadata into provider-specific interfaces for reusable modules and resources.
How deep it goes
Defines the transformation and demonstrates role mapping, while deferring complete troubleshooting and testing details.
Examples
Uses Python-oriented identity mappings that translate generic permissions into GCP, AWS, or Azure role terminology.
What you can do after
Apply it to isolate provider-specific changes while extending infrastructure modules across providers.

Read how Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform explains adapter →

Software Design for Python Programmers

The Adapter pattern is a software design pattern that makes incompatible interfaces work together through an intermediary interface translation layer.

How it is used
Integrates unchangeable external or legacy classes with existing clients that require a different interface.
How deep it goes
Explains object and class adapters through a refactored sports application, then compares their selection trade-offs.
Examples
Uses a sports attendance report, GameData, FootballInfo, VolleyballStats, FootballData, and VolleyballData as concrete artifacts.
What you can do after
Build it from scratch by wrapping or inheriting from incompatible classes and exposing the target interface expected by clients.

Read how Software Design for Python Programmers explains adapter →

Microservices Patterns, Second Edition

A software component that connects application logic to an external interface or system by translating between their interfaces.

How it is used
Connects business logic to external requests and services in a hexagonal architecture.
How deep it goes
Defines inbound and outbound adapters through ports, responsibilities, and examples such as controllers, DAOs, and service proxies.
Examples
Uses REST and web UI adapters, plus database and cloud-service adapters in the FTGO application.
What you can do after
Apply the pattern by routing incoming requests through inbound ports and implementing outbound ports for databases or external services.

Read how Microservices Patterns, Second Edition explains adapter →

Object-Oriented Software Design in C++

The Adapter Design Pattern is a structural design pattern that converts one interface into another interface expected by clients so otherwise incompatible components can work together.

How it is used
Integrates external or legacy components with application clients when their interfaces cannot be changed or do not match.
How deep it goes
Explains interface conversion through wrapping, client simplification, generic roles, and multiple-inheritance alternatives.
Examples
Uses shape and text interfaces, plus FootballInfo and VolleyballStats adapted for an AttendanceReport.
What you can do after
Build it from scratch by implementing a target interface, wrapping an incompatible object, and translating its operations for clients.

Read how Object-Oriented Software Design in C++ explains adapter →

Unit Testing Principles, Practices, and Patterns

A design pattern that presents an application's interface over a different interface supplied by an external component or library.

How it is used
Separates application code from third-party libraries when testing unmanaged dependencies.
How deep it goes
Defines the abstraction, rationale, and maintenance risks, but does not detail adapter implementation.
Examples
Uses an IBus message-bus wrapper and BusSpy or Moq interaction verification.
What you can do after
Apply it by defining project-owned interfaces over third-party dependencies and mocking those interfaces.

Read how Unit Testing Principles, Practices, and Patterns explains adapter →

Go in Action, Second Edition

The adapter pattern presents an existing component through an interface compatible with the surrounding application's expectations.

How it is used
Connects a worker’s domain Fetcher port to an external RSS parsing library without exposing infrastructure types.
How deep it goes
Demonstrates interface implementation, model translation, compile-time checking, dependency direction, and replacement, but not adapter variants.
Examples
Uses RSSReader, gofeed.Parser, domain.Fetcher, Feed and Article conversions, and worker fetch-and-store processing.
What you can do after
Build it from scratch by defining a domain port, implementing an infrastructure wrapper, translating models, and asserting interface compatibility.

Read how Go in Action, Second Edition explains adapter →

The Art of Unit Testing 3e

An adapter is a component that abstracts or translates an underlying dependency behind a replaceable interface.

How it is used
Uses adapters to replace asynchronous dependencies with controllable substitutes during tests.
How deep it goes
Explains dependency abstraction, a network example, and three injection styles without detailing adapter internals.
Examples
Uses a node-fetch wrapper and a website verifier tested with fake network results.
What you can do after
Apply it by wrapping an asynchronous dependency behind a small interface and substituting a fake in tests.

Read how The Art of Unit Testing 3e explains adapter →

The Art of Code

A compatibility adapter is an intermediary component that translates between an older interface or data format and a newer one.

How it is used
Preserves client compatibility while exposed interfaces, endpoints, or data formats evolve.
How deep it goes
Defines the translation layer and weighs its maintenance cost, but stops short of implementation detail.
Examples
Uses changing endpoint URLs, old and new formats, deprecated methods, and versioned entry points as compatibility cases.
What you can do after
Evaluate when translation layers can reduce disruption and when their maintenance burden outweighs the benefit.

Read how The Art of Code explains adapter →

Software Architecture Decision-Making

An adapter is a component that presents a consistent interface around an external dependency whose interface differs from the application's internal needs.

How it is used
Isolates external integrations from core workflow logic while preserving room for later change.
How deep it goes
Defines simple adapters and defers generalized frameworks, implementation details, and reuse until repeated patterns emerge.
Examples
Uses simple adapters around known integrations in an internal workflow system.
What you can do after
Apply it via simple interfaces that keep external dependencies out of core workflow logic.

Read how Software Architecture Decision-Making explains adapter →

Effective Platform Engineering

An adapter pattern is a design pattern that standardizes interaction between incompatible interfaces or data representations by translating one into another.

How it is used
Standardizes release and deployment events so platform APIs and consumers can integrate diverse engineering systems.
How deep it goes
Explains adapter boundaries, event normalization, publisher-consumer separation, and observability correlation without detailing adapter implementation code.
Examples
Uses GitHub, CircleCI, Kubernetes, ArgoCD, Flagger, OpenTelemetry, metrics platforms, and deployment-event correlation as concrete examples.
What you can do after
Diagnose deployment-related incidents by correlating normalized release events with service health metrics.

Read how Effective Platform Engineering explains adapter →

Functional Programming in C#, Second Edition

An adapter is a software component that mediates between an application and the outside world or another component.

How it is used
Uses adapters to reshape function interfaces, compose workflows, and translate application-core abstractions at external boundaries.
How deep it goes
Works through C# examples of argument swapping, effect conversion, and HTTP translation without developing a general adapter theory.
Examples
Demonstrates swapped division arguments, Option-to-HTTP responses, Option-to-Validation conversion, and Unit-based timing middleware.
What you can do after
Apply adapter functions to change argument order, translate Option results into HTTP responses, and fit functions into workflows.

Read how Functional Programming in C#, Second Edition explains adapter →

Event Processing in Action

A software component that enables interaction between systems with incompatible interfaces.

How it is used
Connects event-processing platforms with external formats, information sources, sensors, or business applications.
How deep it goes
Defines adapter roles and gives integration contexts, but does not detail implementation steps.
Examples
Uses log files, hardware sensors, standard event formats, and business applications as integration examples.
What you can do after
Understand where an adapter can translate event formats or bridge an event network to external producers and consumers.

Read how Event Processing in Action explains adapter →

Also covered in

What to know first

Related concepts

Questions about adapter

What is adapter?

An adapter is a software component that translates between interfaces or representations so otherwise incompatible components can work together.

Which Manning books explain adapter?

Clean Applications with Hexagonal Architecture, Acing the Frontend Interview, Grokking Software Architecture, Designing AI Systems, gRPC Microservices in Go, Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform, Software Design for Python Programmers, Microservices Patterns, Second Edition and 9 more.

What should I know before learning adapter?

Manning books that teach adapter usually introduce contract, interface, dependency and HTTP first.

What kinds of adapter are there?

Kinds of adapter include anticorruption layer and repository adapter.

What is adapter a kind of?

Adapter is a kind of producer. A producer is an entity or computation that generates or supplies data, values, messages, events, or work for consumption or processing by another.

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.