What the C.R.U.D.?

CRUD and RESTful user interface conventions.

Create, Read, Update and Delete

What is C.R.U.D?

The unfortunately unpleasant acronym “CRUD” refers to the four basic methods developers use to take data from a user interface and store it in an application: “Create,” “Read,” “Update,” and “Delete.” The inception of this helpful and commonly used acronym was likely coined in 1983 by IT consultant and author James Martin. These four functions interact with database applications and persist data on the backend of an app. Many programming languages have “CRUD” equivalents with analogous words.

CREATE - post, add new entry, taking new data and adding it to the database/backend.

Ex) Posting a new photo to your Instagram feed.

READ - retrieve information that already exists, view it on the page (nothing changes, the user can simply see the data).

Ex) Tapping the comments under said photo to see all comments already posted by followers.

UPDATE - change or edit existing entries, data.

Ex) Editing an already-existing caption on said post.

DELETE - destroy, deactivate, remove some bit of data from the backend entirely.

Ex) Deleting the post.

All models within an app or API should have these four basic functionalities.

What is REST?

Routing conventions and URL naming conventions using REST

REST stands for “Representational State Transfer,” a term coined by computer scientist Roy Fielding in 2000. It refers to a software framework of conventions for web developers, RESTful APIs and routing in web applications. Though “RESTful” conventions exist independently of HTTP (Hyper Text Transfer Protocol) each CRUD action is associated with an HTTP method.

CREATE → POST/PUT

READ → GET

UPDATE → PUT/POST/PATCH

DELETE → DELETE

CRUD vs. REST

These are two very prominent ideas in web development, and because they are similar in definition they are easily confused. “REST” is a design style and set of standards that adhere to certain principles, where “CRUD” is simply the four basic functions performed by database applications.

Further Reading

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sam Hall

Sam Hall

Full stack developer and stand-up comic.