logoalt Hacker News

globular-toast • today at 9:22 AM • 1 reply • view on HN

What do you define as "writing the CRUD stuff yourself"? Back in the day when I first learnt PHP I used to do SQL string interpolation. That is probably what you mean by "doing it yourself", but of course I'm still leaning heavily on a SQL database to do the actual CRUD for me. You probably don't mean writing bytes to hard disks yourself, right?

Frameworks like Django and Rails do basically everything for you. You don't have to touch a line of SQL, even for migrations! I struggle to see how, for just CRUD, it can get any easier than Django.

People used their brains to build Postgres and Django to avoid having to "do CRUD" over and over. Anyone doing a Django site wasn't spending the time "doing CRUD", they were spending the time thinking about business logic, firing off async tasks etc. All stuff that you can do once the basic CRUD problem has been solved.


Replies

sevenzero • today at 9:47 AM

Hmm I mean it in a code over configuration way. If you have to write code for CRUD that's good for me, as I am able to introduce all kinds of nitty gritty rules to my objects and I know how to do that. As soon as someone comes along and tries to sell me their cool CRUD tool, where everything is now just a configuration, I dislike it, as it complicates things.

A concrete example would maybe be using Ecto (Elixir), with changesets and code where I can introduces all kinds of object specific rules without putting too much thought into it compared to Ash, where everything now is a configuration. Ash is using Ecto under the hood and its probably possible to do all the stuff I need there as well, but I'd have to research on how to much longer.

➕ show 1 reply