The Neuronen Schmiede concerns itself with topics related to software development. One focus are robust web applications.

The Fine Line Between CRUD and Business Logic


In the beginning it’s often easy to start a feature or entire system based on a CRUD approach. As time progresses the CRUD approach becomes less ideal or an outright entangled mess.

For example take an imaginative thing called an event. It has a title and description people can read plus a number of seats. A CRUD implementation works perfectly fine for this.

A new feature is added that allows people to book seats at an event. At this moment something important happens that often goes unnoticed. The number of seats at an event are no longer something that should be implemented with CRUD.

Instead making seats available for an event needs to be modelled explicitly in the business logic same as booking a seat. This explicitness makes it possible to build and establish business processes that are visible.

It’s often hard to spot when the fine line between CRUD and business logic is crossed. The later it is spotted the more painful moving away from CRUD gets.