web dev//CRUD

CRUD is the acronym for the four basic operations on data (Create, Read, Update and Delete), which any app that manages information implements. Each layer of a stack spells them in its own words.


CRUD is the acronym for the four basic operations on data (Create, Read, Update and Delete), which any app that manages information implements. Each layer of a stack spells them in its own words.

In SQL they are INSERT, SELECT, UPDATE and DELETE; in a REST API, POST, GET, PUT or PATCH, and DELETE.

In Hono (or Express) there is one handler per operation (app.get, app.post, app.put, app.delete).

Wrangler runs these handlers locally against D1 for development, and in production against the remote D1, with identical code.

Creating a resource can trigger side effects in the same handler: creating a contact can automatically create its associated story and prospect, all in TypeScript and in the same API handler.