views:

69

answers:

3

My current project has business objects that change over time. The objects can have future changes as well as past changes. One of my tasks is to create viewers and editors for these objects that let the user see its state at any point in the past or future. The changes are fairly simple: one or more property values changed/will change on a certain date.

I'd like to give the user a simple way to see this. At minimum I need to allow the user to roll forward and back through the object's history. I'd also like to show the previous/next values (if any) of each property if I could do that without getting too cluttered or distracting. And finally, it would be cool if there was some visual way to show the complexity of the object's history, e.g., a "timeline" or something. This is C# 3.5 on Windows forms or WPF. All ideas are appreciated. Thanks.

One more thing: are there any patterns or best practices for coding objects with a time dimension?

Thanks again.

A: 

In general, what you're talking about is having a "meta-object"; that is, some object which keeps track of your business objects and which provides a consistent way to query for past and current values of state. In general, this involves having a strong data description of your "business objects", which really turns them into business data. Effectively, what you're talking about is simply migrating what you consider to be "business objects" into the "business data" end of things. It's certainly possible; I'd suspect that just this change in perspective may assist you with the process.

McWafflestix
A: 

I think one of the cleanest examples of what your trying to accomplish can be found right here at stackoverflow. Viewing the history of your answer edits.

J.13.L
+2  A: 
msulis