News for hackers. Stuff that matters.
Re:Avoiding the soft delete anti-pattern by GMoromisato on Sunday May 12, 2024 @03:25PM (#40336839)
Isn't soft-delete just a variant of having a lifecycle? The article tries to distinguish it by saying that the lifecycle pattern is implemented at the app-layer instead of the database layer, but isn't their criticism of soft-delete that the app-layer has to deal with it?

Maybe a better recommendation is to give guidelines for implementing soft-delete?

Re:Avoiding the soft delete anti-pattern by meatmanek on Sunday May 12, 2024 @04:11PM (#40337223)
As I understand that section: if the data you're dealing with already has a need for some sort of lifecycle that's fairly prominent in your data model (i.e. where you're likely to be filtering based on the lifecycle column in all your queries anyway), then adding a lifecycle state for "deleted" is perfectly fine.
Re:Avoiding the soft delete anti-pattern by AdrianB1 on Sunday May 12, 2024 @03:46PM (#40337013)
I have the same struggle figuring what the author wants to say about this. The difference between a soft delete and a lifecycle, in the context of the article, is just semantic.
Re:Avoiding the soft delete anti-pattern by schwede on Sunday May 12, 2024 @04:04PM (#40337164)
I think the idea is you could still have a page in the UI that shows archived data but you wouldn’t do that normally with a soft delete. The lifecycle thing makes it up front with the user instead of hiding soft delete as an implementation detail.