Glossary term
What is DTO (Data Transfer Object)?
DTO stands for Data Transfer Object.
In Backend in Depth
A plain object that sets the shape of data that crosses a border, like a request body or response. It is separate from the database model.
Learn it properly · Backend in DepthLesson 3: Validation at the Edge: Schemas, DTOs and Trusting NothingCheck input where it enters the API, share schemas with the frontend, and keep validation errors apart from business-rule errors.In API Design
A plain object that describes the public shape of a request or response, kept apart from the database row.
Learn it properly · API DesignLesson 2: Request and Response Design: JSON Shapes, Errors and ValidationConsistent JSON, naming, dates and money, one error format (RFC 9457 problem details), validation with clear messages, and what never to return.In Next.js App Router
A small plain object holding only the fields a screen needs, used so secrets in a database row never cross to the browser.
Learn it properly · Next.js App RouterLesson 1: Server Components and Client Components: What Runs WhereServer by default, what use client really means, the boundary, passing props across it, and the mistakes that leak secrets or bloat the bundle.