HTTP, CRUD, and Database
HTTP is an extensible protocol, but at its core, it facilitates CRUD operations.
INFO
CRUD stands for Create, Read, Update and Delete.
Almost all internet consumer-related software uses CRUD; you use it every time you ask an application to take your new data or modify the existing one.
The basic HTTP verbs corresponding to CRUD operations are:
- GET — retrieve a specific resource (by id) or a collection of resources
- POST — create a new resource
- PUT — update a specific resource (by id)
- DELETE — remove a specific resource by id
Data persistence with Database
Adding persistence to an application means storing data so that it persists beyond the lifetime of the application. This is typically achieved by storing application data in a database.
What is a database?
A database is a shared collection of related data.
The CRUD operations are the four most basic operations that can be performed with all database systems and they are the backbone for interacting with any database.
Going beyond CRUD!
A simple CRUD application is just a front-end (UI) for a database! Most software development frameworks have the concept of CRUD deeply embedded in their toolset, making it too easy to get an app up and running in a matter of days with little code that is doing anything else. You don't learn much about software engineering if your app is mostly CRUD. You should strive to incorporate some challenging functional requirements to go beyond a simple CRUD application.
For example, the Prodensity app that JHU uses to track your health status during the Pandemic is a simple CRUD application.
Is there room to go beyond CRUD for TinyRUL?
Yes! Infact, did you think about how to generate the short URLs? You may want to look this up online! There are few different strategies you can encorporate to encode the long URLs into short ones!