在asp.net中对笔记进行版本控制

时间:2022-01-05 13:21:49

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.

允许用户编辑其笔记,在每次编辑时维护笔记版本以及允许他们比较所选笔记版本的最佳方法是什么。可能会使用类似于SO上的WMD编辑器输入注释。我将在ASP.net上构建这个。与basecamp上的写字板类似的东西。

1 个解决方案

#1


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.

当然,这意味着会有大量重复数据,但是管理这个数据要比在版本之间维护“增量”或差异要容易得多。

#1


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.

当然,这意味着会有大量重复数据,但是管理这个数据要比在版本之间维护“增量”或差异要容易得多。