What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

I'm curious how the SO engine actually tracks data changes to questions, answers, etc. about unicorns in order to show what changes have been made.

For example, is it a coded solution/function that is executed during the update calls:

var changes = new List<Change>();
if (oldPropertyValue != newPropertyValue) 
{
   changes.Add(new Change(
       PostType.QuestionTitle, 
       oldPropertyValue, 
       newPropertyValue));
}

or if there is a more robust plug and play type component that will do all of the tracking for you, etc....

Obligatory Unicorn Reference that adds no value to this post...

alt text

share|improve this question
2  
Be careful. The last guy who asked that question is still missing. –  Nick Dandoulakis Apr 1 '10 at 16:07
    
@Nick D: lol.... I'm just curious if this is a bunch of ` if(old != new){ changes.Add(old.fieldname, new.value); }` or if there is a cleaner way of going about it... –  RSolberg Apr 1 '10 at 16:09
    
@Chester, I'm not a db expert but I assume database triggers are part of the design. –  Nick Dandoulakis Apr 1 '10 at 16:24
    
@Chester: this question has NOTHING to do with unicorns. This is a travesty!!!!!!!!!1111!!!!oneoneonen!!!!! –  Ether Apr 1 '10 at 17:49
    
@Ether: LOL.... –  RSolberg Apr 1 '10 at 18:11
    
Okay, now that there are unicorns, I'll upvote you! –  Ether Apr 1 '10 at 19:10

2 Answers 2

up vote 3 down vote accepted

They store every version in the original markdown, and the latest version is also stored as a converted HTML document for quick display.

When you request a revision history, it loads the various revisions and diffs them, then displays the diff for you.

share|improve this answer
1  
is that difference engine something that is rather robust or straightforward? I think the storing of all revisions is pretty easy... –  RSolberg Apr 1 '10 at 16:16
    
There was a blog post on it.... lemme look. –  Adam Davis Apr 1 '10 at 16:18
    
Huh, can't find the one I was thinking of. It went on at length about diff strategies and a little bit on what they implemented and why. –  Adam Davis Apr 1 '10 at 16:23

It handles it pretty well, don't you agree?

share|improve this answer
    
I do agree... Hence the reason for the question to figure out what I need to look at for implementing elsewhere... –  RSolberg Apr 1 '10 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .