views:

44

answers:

1

what is the best way to allow users to edit their notes, maintain versions of the notes on each edit and also allow them to compare the selected versions of the notes. the notes would probably be entered using a WMD editor similar to the one on SO. i would be building this up on ASP.net. something similar to writeboards on basecamp.

+1  A: 

A simple way to do this would be to create a table with a text field, and a version number. Any time a note is updated and (re)submitted, save a complete copy of the updated text with an incremented version number. This way you have a complete history of edits.

Of course, this would mean a lot of duplicated data, but managing this would be a lot easier than trying to maintain "deltas" or diffs between versions.

Andy White
how would you implement comparison of 2 diff versions ?
Vikram
Not sure :) That might be another good question... What does SO use for comparing edits? Maybe they're using an opensource diff library.
Andy White