DEV Community 👩‍💻👨‍💻

Cover image for What is pure CRUD?
Thomas Hansen
Thomas Hansen

Posted on • Originally published at aista.com

What is pure CRUD?

CRUD is the only thing you need to learn to become a master software developer. Everything else is just rubbish. CRUD is an acronym and it implies Create, Read, Update and Delete. As you're learning the art of software development, a lot of senior software developers will tempt you with rubbish ideas such as CQRS, DDD, OOP, OOD, OOA and Event Sourcing. Don't listen to them, just leave them alone with their own rubbish. If you can master pure CRUD you'll run around them in circles and deliver 100 projects in the same time they're delivering one. The last point results in that you'll earn 100 times more money than them within a year or two.

That's an over simplification of the problem

I have already anticipated the counter arguments, and I go through them all in the video below. They're all permutations of the above. However, the best examples of that I'm right can be found in 4 use cases for CRUD.

Your file system is pure CRUD

Regardless of what computer you're using, your entire file system is based upon CRUD. The only difference being that it's using synonyms to CRUD such as "Save", "Load", "Append", and "Delete" - It's still 100% pure CRUD.

Your database is pure CRUD

If you've ever used a database, you've probably read up about words such as "insert", "select", "update", and "delete". These are of course just synonyms to CRUD, and literally exists in a one to one mapping towards CRUD. Every single database ever created, including the stuff Google and Facebook runs on is based upon pure CRUD.

HTTP is pure CRUD

There is nothing in the HTTP standard that's not CRUD. Instead of the CRUD verbs, it's simply using synonyms, such as POST, GET, PUT, and DELETE. Post is for creating items, get is for reading items, put is for updating items, and delete for deleting items. If the world's largest software system ever built (the world wide web) was happy with CRUD, what makes you think your problem is so special it needs more than CRUD?

Kubernetes is pure CRUD

Yup! The world's largest and most valuable software system, being Kubernetes, is built upon pure CRUD. Don't believe me? Check out its documentation. If CRUD was good enough to build every single project Google delivered, what makes you think you'll need CQRS? One of the largest software companies in the world literally built their entire backbone server infrastructure upon CRUD!

If CRUD is good enough for Kubernetes, what makes you think it's not good enough for you?

Wrapping up

In the video below I am walking you through the arguments if you need to arm yourself for your next architectural meeting with your local "CQRS expert", in case arguments such as DDD, OOA, OOD, Sagas, and Event Sourcing surfaces. Facts are, if you master CRUD, you need nothing else! You'll be able to deliver 100 times faster, 100 times better quality, and 100 times more consistent. CRUD is all you need, literally!

The dirty little secret of our industry is that the simpler you keep things, the more you can expand upon it, and the better the end result becomes - ALWAYS!

Top comments (8)

Collapse
 
miketalbot profile image
Mike Talbot

I'd agree database CRUD is a requirement of most systems, it's not a high effort part of most non-trivial systems. It's pretty easy to find a CRUD implementation for whatever it is you want to do, layering on a bit of aggregation and reporting can be pretty straightforward as well - unless it isn't (I'm looking at you Firebase). It's fair to say that choosing the wrong CRUD implementation for your architecture could certainly trip you up.

Solutions which are effectively just a database with a few forms to enter information have a much higher amount of their code related to CRUD, although there's locking, conflict resolution, change notification etc if it has multiple users working on the same documents at the same time. Then there is also workflow which can be a nightmare if naively implemented.

There are esoteric systems that need things like event sourcing and all of the pain that comes with it, and I've certainly seen people implement such solutions in entirely the wrong place because it was "cool tech".

Collapse
 
polterguy profile image
Thomas Hansen Author

Word! As to locking? 98% of the problem vanishes once you're applying partial record updates ...

Collapse
 
miketalbot profile image
Mike Talbot

Yeah that's a really nice feature of your platform.

Thread Thread
 
polterguy profile image
Thomas Hansen Author

Thank you ^_^

We try ... ;)

Collapse
 
naveennamani profile image
naveennamani

I didn't understand how k8s is crud

Collapse
 
polterguy profile image
Thomas Hansen Author

All resources added to K8S is done using the CRUD axiom. For instance "create deployment", "update deployment", etc. The entire managing of K8S is done through CRUD.

Collapse
 
bias profile image
Tobias Nickel

this question is not about CRUD: I wonder what is your opinion on code version cobtrol with git

Collapse
 
polterguy profile image
Thomas Hansen Author

Git is awesome! Luv it!

Take a look at this:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. 🛠