4 ms·
I'm wondering if I can use this in an ERP system I'm developing. A feature request has been to see a diff history of actions on an entity (say, Purchase Orders)
by kossae 7y ago
I'm wondering if I can use this in an ERP system I'm developing. A feature request has been to see a diff history of actions on an entity (say, Purchase Orders). Using something like this, I believe I could make a 'commit' on each save, then display a history of commits to the user to 'diff' against to see previous revisions (who added which items, when did the PO number change, etc).
I was planning on storing this history in the database as raw JSON, then diffing the JSON server-side, but this may provide a more robust solution.
- vimslayer 7y agoThat could work, but note that there are other libraries that are purpose-built to do diffing without the rest of git's many features. We are using jsondiffpatch [1] and quite happy with it. It also has builtin formatters to output e.g. html view of the changes. [1] : https://github.com/benjamine/jsondiffpatch/blob/master/README.md https://github.com/benjamine/jsondiffpatch/blob/master/READM...
- kossae 7y agoOh that is sweet! Thanks for the tip!