liveBook · Manning

Handler

A handler is a software routine or component invoked to process an event, request, message, or other input.

How 29 Manning books explain it

ASP.NET Core in Action, 3e

A handler is an application component that receives a framework-dispatched request or event and performs the corresponding processing.

How it is used
Uses handlers as request entry points for minimal APIs, Razor Pages, and MVC controllers.
How deep it goes
Explains routing, handler selection, binding, service delegation, validation, and response choices through worked examples.
Examples
Demonstrates fruit CRUD endpoints, a category to-do page, and checkout validation with a redirect.
What you can do after
Apply handlers via ASP.NET Core to receive requests, delegate work to services, and select responses.

Read how ASP.NET Core in Action, 3e explains handler →

React Quickly, Second Edition

Event handling is the process of responding to events generated by user interactions or changes in a web document.

How it is used
Connects user interactions and browser events to React UI updates through handlers assigned to JSX elements.
How deep it goes
Works through handler definitions, event objects, propagation, default actions, and manual listener cleanup, with capture handlers flagged as uncommon.
Examples
Uses counters, a video player, a contact form, a login form, a window-size display, and an expandable menu.
What you can do after
Build it from scratch: attach JSX handlers for interactions and add cleaned-up native listeners when React cannot manage the target or event.

Read how React Quickly, Second Edition explains handler →

Learn Go with Pocket-Sized Projects

An HTTP handler is a function or component that receives an HTTP request and produces an HTTP response.

How it is used
Implements web-service endpoints by handling requests and producing responses.
How deep it goes
Works through routing, method checks, JSON handling, response status ordering, and direct handler tests.
Examples
Uses game-creation and guess endpoints, curl requests, and a response recorder to demonstrate handler behavior.
What you can do after
Applies Go net/http to route, implement, and test HTTP handlers.

Read how Learn Go with Pocket-Sized Projects explains handler →

Pro ASP.NET Core 7, Tenth Edition

A callable operation that responds to an occurrence such as a user interaction or program event.

How it is used
Handles Razor Page HTTP requests and Blazor component events through methods selected by request conventions or event attributes.
How deep it goes
Works through handler naming, selection, parameter binding, redirects, and server-side event dispatch; defers detailed model binding to another treatment.
Examples
Uses a cart add/remove flow, a product-price editor, and Blazor counter buttons to show handlers in action.
What you can do after
Build it from scratch: implement GET, POST, and named Razor Page handlers, then wire a Blazor button to a component method.

Read how Pro ASP.NET Core 7, Tenth Edition explains handler →

Build a Frontend Web Framework (From Scratch)

A programmatic callback that responds to an event raised by a user interface or other software component.

How it is used
Connects browser interactions, dispatched commands, and component events to functions that respond or update application state.
How deep it goes
Builds registration and dispatch, then elaborates component binding, argument forwarding, and unsubscription rather than stopping at a callback definition.
Examples
Uses to-do input and button listeners, a remove-todo command, and parent-supplied handlers for child events.
What you can do after
Build it from scratch: register DOM and command handlers, bind component context, and unsubscribe component event handlers on unmount.

Read how Build a Frontend Web Framework (From Scratch) explains handler →

D3.js in Action, Third Edition

An event listener is a callback registration that runs code in response to a specified event on an interface object.

How it is used
Connects clicks, pointer movement, and window resizing to chart updates, tooltips, and responsive labels.
How deep it goes
Works through D3 callback arguments and concrete handler actions, including active-state checks and tooltip visibility.
Examples
Uses histogram filter buttons, temperature-chart circles, window resizing, and circle-pack nodes as event targets.
What you can do after
Build it from scratch with D3 on() or JavaScript addEventListener() to make charts respond to clicks, hovering, and resizing.

Read how D3.js in Action, Third Edition explains handler →

Web Components in Action

An event listener is a callback registration that causes code to run when a specified event occurs on an object.

How it is used
Connects browser events such as clicks and mouse movement to component behavior.
How deep it goes
Demonstrates listener registration, callback scope, and event-driven component behavior without surveying the event API.
Examples
Uses photo-carousel buttons, a draggable slider, and mouse-strummed harp strings as concrete event-driven examples.
What you can do after
Apply it via addEventListener to route click or mouse events into component methods.

Read how Web Components in Action explains handler →

Microservices Patterns, Second Edition

An event handler is a software component that receives an event and performs the associated processing.

How it is used
Uses event handlers to advance sagas, perform asynchronous follow-up work, and maintain CQRS views.
How deep it goes
Explains handler responsibilities and operational trade-offs, including atomic event recording and concurrent view updates.
Examples
Illustrates order events coordinating services and triggering confirmation emails, alongside a configured Eventuate event consumer.
What you can do after
Evaluate when asynchronous handlers reduce coupling and what publication, deduplication, and transaction complexities they introduce.

Read how Microservices Patterns, Second Edition explains handler →

Refactoring to Rust

An NGINX HTTP handler is a module function that receives an NGINX request structure and returns an integer request-processing status.

How it is used
Uses an HTTP handler to connect an NGINX endpoint to a Rust calculator.
How deep it goes
Works through handler signatures, C interoperability, asynchronous body reading, buffer checks, and UTF-8 validation, while leaving broader plugin development outside scope.
Examples
Uses a POST-based Reverse Polish Notation calculator and a body-reading callback that logs the parsed request.
What you can do after
Apply it via NGINX and Rust to expose a handler and read a request body through a callback.

Read how Refactoring to Rust explains handler →

Spring in Action, Sixth Edition

A Spring Integration handler contract for processing an incoming message.

How it is used
Uses handlers to perform work on messages received by service activators and to finish or continue integration flows.
How deep it goes
Explains handler arguments, return values, annotations, and Java DSL configuration through implementations, without detailing framework internals.
Examples
Shows payload printing, repository-based order saving, and posting an email order to an API.
What you can do after
Apply it via Spring Integration to configure handlers that process messages, return results, or end a flow.

Read how Spring in Action, Sixth Edition explains handler →

Go by Example

A handler is a software component that receives an operation or request and produces the corresponding processing result.

How it is used
Processes HTTP requests into responses for service endpoints, health checks, and routed API operations.
How deep it goes
Explains function adaptation, closures, status responses, routing, and direct tests, while deferring middleware composition.
Examples
Uses an OK health endpoint, a URL-shortening POST handler, ServeMux routes, and a ResponseRecorder-based test.
What you can do after
Apply it via Go’s net/http and httptest packages to register, test, and compose request handlers with explicit dependencies.

Read how Go by Example explains handler →

F# in Action: A Revised Edition of Get Programming with F#

An event handler is a function or method invoked in response to an event raised by a program component.

How it is used
Builds request-response pipelines for web endpoints from small filters and response writers.
How deep it goes
Explains the handler signature, continuation choices, composition, routing, and a custom implementation; leaves query-string validation simplified.
Examples
Uses device-status GET and device-execute POST endpoints, plus a query-driven handler returning JSON or 404.
What you can do after
Build it from scratch in Giraffe by composing built-in handlers and writing a function with the HttpHandler signature.

Read how F# in Action: A Revised Edition of Get Programming with F# explains handler →

Acing the Frontend Interview

An event listener is a registered callback associated with an event target and invoked when a matching event occurs.

How it is used
Uses handlers to assess JavaScript execution reasoning and demonstrate efficient event handling in dynamic web interfaces.
How deep it goes
Defines handlers and demonstrates delegated clicks, without detailing handler registration options or broader event APIs.
Examples
Shows a parent-list click listener that filters for list items and logs the clicked item’s text.
What you can do after
Understand how a parent listener handles bubbled clicks and filters events by their target.

Read how Acing the Frontend Interview explains handler →

Go in Action, Second Edition

A handler is a component or function that receives an operation or event and performs the associated application processing.

How it is used
Uses handlers to process HTTP requests and translate between clients and a service's domain.
How deep it goes
Explains handler functions, route dispatch, response testing, and dependency injection through implementations.
Examples
Uses GET and POST greeting handlers and a read-only article endpoint to illustrate handler design.
What you can do after
Build handlers from scratch and test their responses with Go's httptest tools.

Read how Go in Action, Second Edition explains handler →

Learn Docker in a Month of Lunches, Second Edition

A message handler is a software component that receives messages or events and performs processing in response.

How it is used
Processes queued events after publishers hand them off, keeping event-driven work outside the user-facing request.
How deep it goes
Explains subscriptions, buffering, scaling, and asynchronous effects, while using existing handler images rather than detailing handler internals.
Examples
Uses to-do item saving, audit logging, Elasticsearch indexing, calendar reminders, and a text-mutating handler.
What you can do after
Operate and configure handlers with Docker Compose, including scaling a handler group and adding an audit subscriber.

Read how Learn Docker in a Month of Lunches, Second Edition explains handler →

Machine Learning System Design

A software component that receives and processes requests made through an API.

How it is used
Routes API requests to underlying services and returns structured responses, serving as the interface between callers and backend functionality.
How deep it goes
Explains request parsing, delegation, JSON response wrapping, and error handling, while explicitly excluding business logic.
Examples
Uses a photo-search endpoint with optional filters and a JSON response of photo IDs and relevance scores.
What you can do after
Build it from scratch by parsing requests, delegating work, formatting JSON responses, and handling errors.

Read how Machine Learning System Design explains handler →

Web Component Development with Modern Libraries and Tooling

An event handler is a callback or method that executes in response to a specified event.

How it is used
Connects user interactions to component behavior and connects dispatched component events to host-app behavior.
How deep it goes
Shows concrete event bindings, state updates, custom-event details, and listener placement without examining browser event internals.
Examples
Uses a button that opens a page, sortable column headings, radio-button changes, and a listener attached after HTML insertion.
What you can do after
Apply it via Lit, Stencil, or FAST to handle clicks, and use DOM listeners to react to component events.

Read how Web Component Development with Modern Libraries and Tooling explains handler →

Secrets of the JavaScript Ninja, Third Edition

A function invoked in response to an event or request to perform associated application logic.

How it is used
Adds interactivity to client-side interfaces by running application logic in response to events.
How deep it goes
Defines registration and queued, single-threaded execution, while deferring event-loop details and bubbling and capturing.
Examples
Uses DOMContentLoaded and keydown handlers to append event messages, including the pressed key.
What you can do after
Apply event handling by registering functions with addEventListener and reading event data in a keydown handler.

Read how Secrets of the JavaScript Ninja, Third Edition explains handler →

Python How-To

A handler is a logging component that processes records emitted by a logger, typically by writing them to a destination.

How it is used
Routes application event records to persistent files, interactive consoles, or other destinations.
How deep it goes
Demonstrates attaching handlers, using multiple destinations, and setting per-handler levels, while leaving less common handler types largely unexplored.
Examples
Uses task-removal records, console output, duplicate file handlers, and files filtered at WARNING and CRITICAL levels.
What you can do after
Apply Python’s logging module to route records to files or consoles and filter them with handler levels.

Read how Python How-To explains handler →

Build AI-Enhanced Web Apps

Event handling is the processing of user or system events by executing associated application logic.

How it is used
Routes API requests to backend logic or hooks into LangChain.js execution stages for logging, monitoring, and error handling.
How deep it goes
Specifies route placement, HTTP method exports, request handling, and caching, and maps callback events to methods.
Examples
Uses a Next.js POST route that reads JSON and returns a response, plus callback methods for chain and LLM events.
What you can do after
Apply Next.js route conventions to handle API requests or LangChain.js callbacks to trace execution and errors.

Read how Build AI-Enhanced Web Apps explains handler →

Functional Design and Architecture: Examples in Haskell

A Handler is the Servant monad and request-handler type for implementing web operations and producing HTTP responses.

How it is used
Connects Servant HTTP API methods to request-processing functions that return endpoint results or HTTP errors.
How deep it goes
Defines Handler as ExceptT ServerError IO and shows an adapter for running application logic, without detailing Servant internals.
Examples
Uses object retrieval and submission endpoints, plus a database-backed getObject handler and an AppL adapter.
What you can do after
Apply Servant by connecting endpoint methods to handlers and adapting application scenarios into HTTP responses.

Read how Functional Design and Architecture: Examples in Haskell explains handler →

Java Persistence with Spring Data and Hibernate epub

An event handler is a component that receives an event and performs processing in response to it.

How it is used
Adds side-effect behavior in response to Spring Data REST repository events.
How deep it goes
Compares declarative handler annotations with listener inheritance, but does not detail handler implementation.
Examples
Maps create, save, delete, and linked-object operations to repository events.
What you can do after
Configure declarative class- and method-level handlers to add side effects for repository events.

Read how Java Persistence with Spring Data and Hibernate epub explains handler →

Get Programming: Learn to code with Python

An event handler is a function or code unit that runs in response to an interaction or other event generated by a user-interface component.

How it is used
Uses functions to give GUI widgets behaviors such as responding to clicks, menu selections, and keypresses.
How deep it goes
Explains definition, widget linkage, input reading, interface updates, and modular dispatch, but not event-system internals.
Examples
Demonstrates a button changing a window color, a countdown timer, and a two-player canvas game controlled by keypresses.
What you can do after
Build it from scratch by connecting tkinter widgets and canvas events to functions that update a GUI.

Read how Get Programming: Learn to code with Python explains handler →

Vanilla Web

An event listener is a callback registration that causes code to run when a specified event occurs.

How it is used
Makes web apps interactive by running callbacks in response to browser and user events.
How deep it goes
Explains registration choices, listener options, removal, propagation, targets, and default-action control through native DOM APIs.
Examples
Uses click and scroll handlers, a capture-and-bubble diagram, a list click listener, and a dispatched custom event.
What you can do after
Apply it via `addEventListener` to register, configure, and remove browser event handlers.

Read how Vanilla Web explains handler →

Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

An HTTP route handler is a server-side function that processes requests matching a specified HTTP route and produces a response.

How it is used
Defines server behavior for matching HTTP routes, from returning a simple response to streaming media or receiving service messages.
How deep it goes
Builds handlers as Express callbacks using request and response objects, including async work, but leaves Node.js streaming internals unexplored.
Examples
Uses a Hello World GET route, a video-file stream, and a POST route that records a viewed video path.
What you can do after
Apply via Express by defining route callbacks that return responses, stream files, or process POST request bodies.

Read how Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform explains handler →

Secrets of the JavaScript Ninja, Second Edition

A callable routine that runs in response to a dispatched event.

How it is used
Adds interactivity by running code in response to browser events.
How deep it goes
Explains registration, event data, and serial queue execution, while deferring event propagation details.
Examples
Uses mousemove and click callbacks that append messages, plus a button click handler.
What you can do after
Apply it via addEventListener to respond to clicks and inspect the event object.

Read how Secrets of the JavaScript Ninja, Second Edition explains handler →

Akka in Action, Second Edition

An event handler is a function that applies a persisted event to an actor's state during normal processing or recovery replay.

How it is used
Rebuilds actor state from persisted events inside EventSourcedBehavior.
How deep it goes
Defines the function signature and role, but does not show event-specific update logic.
Examples
Uses a cargo-container state and CargoAdded event to illustrate persisted state transitions.
What you can do after
Builds an event-sourced actor by supplying an eventHandler alongside persistence ID, state, and commandHandler.

Read how Akka in Action, Second Edition explains handler →

.NET MAUI in Action

An event handler is a method that executes in response to an event raised by a software component.

How it is used
Connects a .NET MAUI button click to permission checks, location retrieval, and sharing behavior.
How deep it goes
Demonstrates a worked event flow with asynchronous calls and conditional permission handling.
Examples
Uses the FindMe button, OnFindMeClicked, ShareLocation, UsernameEntry, and a shared Bing Maps location link.
What you can do after
Apply it via .NET MAUI by wiring a button event to an asynchronous C# method.

Read how .NET MAUI in Action explains handler →

Grokking Concurrency

An event handler is a function or component that processes an event from a particular source or event type.

How it is used
Processes requests tied to a particular event source or event type within event-based concurrency.
How deep it goes
Defines handlers as callbacks and identifies three socket-related roles, without detailing their implementations.
Examples
Uses _on_accept, _on_read, and _on_write for connection acceptance, client messages, and client writes.
What you can do after
Understand how to associate callbacks with specific events and sources.

Read how Grokking Concurrency explains handler →

Also covered in

What to know first

Related concepts

Questions about handler

What is handler?

A handler is a software routine or component invoked to process an event, request, message, or other input.

Which Manning books explain handler?

ASP.NET Core in Action, 3e, React Quickly, Second Edition, Learn Go with Pocket-Sized Projects, Pro ASP.NET Core 7, Tenth Edition, Build a Frontend Web Framework (From Scratch), D3.js in Action, Third Edition, Web Components in Action, Microservices Patterns, Second Edition and 21 more.

What should I know before learning handler?

Manning books that teach handler usually introduce JSON, HTML, HTTP request and event first.

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.