Re:Should "Yes, delete it" be red, or green?
by jonahx on Wednesday March 26, 2014 @11:48PM
(#7478480)
How would the Event-Sourcing method work?
[ Parent
| on HN ]
Re:Should "Yes, delete it" be red, or green?
by lomnakkus on Thursday March 27, 2014 @02:19AM
(#7478904)
A useful analogy might be how accounting ledgers work. You never really delete anything; you just keep appending records saying what you've done. The balance is just the sum of all those operations. (Ledgers are a bit special in that usually all the operations in a ledger are commutative (+/-), but other than that it seems a pretty good analogy.)
Re:Should "Yes, delete it" be red, or green?
by darylteo on Wednesday March 26, 2014 @11:53PM
(#7478491)
First you start treating each event/operation as a fundamental part of your problem. Each Event can then have a opposite reverting Event. So if you want to reverse an action, you can just apply the opposite event. You can also display a list of recent events that have taken place easily:
- user X modified article Z
- user Y deleted article Z (revert?)
Note that I've only studied this in passing, and have never applied this in practice, so I can't answer just how effective this could be. Also not really sure how this works when other actions have already taken place, or how you can detect if an event cannot be recovered from (if there is such a thing).