Tracking Changes/Text Versioning

wayneph
02-06-2006, 12:23 PM
OK, I'm currently working on a project where I will want to be able to do some track and view changes on some text that is put in by users. I've currently got a couple different ideas, but am looking for some other suggestions as well.

Idea 1: Store the complete text for all versions. Then use a comparison similar to Source Safe to iterate through the lines and determine what changes have been made.

Idea 2: Store all iterations together using XML to insert modifications. The main document will be stored, and then there can be a section for additions or deletions that can be tagged with the users name and updates.

Overall, I like idea 2 better, but i'm still very vague on the options and details setting this up. The reason I like it, is because I will be monitoring changes from multiple users on the same document, and it could get fairly slow comparing a bunch files for differences each time. It would also take a lot more space to store the entire text again, even if only one line has changed.

The last idea was to try and use Source Safe from with in my application. This isn't a "last resort", but it seems awfully similar to Idea #1, and I think I would be forced to write the files to the filesystem in order to get VSS on it. If I can prevent having to write the files to the drive I would much prefer that.

In the end the original submitter should be able to see their original version, a list of suggestions from an unknown number of "modifiers" and be able to accept or reject any suggestions. Currently they are printing out the file and walking it around the office.

Any ideas welcome.

herilane
02-06-2006, 03:48 PM
Why recreate the wheel? MS Word has got change tracking built in.

wayneph
02-06-2006, 07:26 PM
That thought had crossed my mind as well. The only reason I had shied away from using Word is because this is going to be part of a larger Web Application. I've never had a good experience trying to automate Office using server-side code. (I'd also have to check with our Platform Team to see if Office is even installed on the server, or if they would install it there.) I guess one possibility for getting around some of the concurrency issues would be to create a queue and make sure only one is processing at a time.

In either case I'll definately have to research it more. :)

herilane
02-07-2006, 02:05 PM
Ah, if it's to be run on a server then I'd be less enthusiastic about suggesting Word.
Still, looking at how Word implements it might give you some ideas.

Another thing worth checking: OpenOffice. It has change tracking and the file format is XML-based. See how they have implemented it.
In fact it is automatable as well, but I don't know how server-runnable it is, though, or how user-friendly the API is.

wayneph
02-07-2006, 03:11 PM
Well, the project may have just gotten a lot simpler. (and less fun in the process, but you can't win them all.)

We may just add the ability to add "Annotations" or comments to the text. Since the original user is going to have the ability to accept or reject any suggestions, this may allow users to focus more on the content as opposed to nit-picking on the wording.

If I can find a good solution I may still look at doing somthing like the original question just for learning purposes... (it would be way down on the bottom of the list.)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum