Are there any examples of a temporal field/object updater?

Posted by Bryan Agee on Programmers See other posts from Programmers or by Bryan Agee
Published on 2013-10-24T04:01:38Z Indexed on 2013/10/24 4:07 UTC
Read the original article Hit count: 299

Filed under:
|

The system in question has numerous examples of temporal objects and fields--ones which are a certain variable at a certain point in time. An example of this would be someone's rate of pay--there are different answers depending on when you ask and what the constraints might be; eg, can there ever be more than one of a certain temporal object concurrently, etc.

Ideally, there would be an object that handles those constraints when a new state/stateful object is introduced; when a new value is set, it would prevent creating negative ranges and overlaps.

Martin Fowler has written some great material on this (such as this description of Temporal Objects) , but what I've found of it tends to be entirely theoretic, with no concrete implementations.

PHP is the target language, but examples in any language would be most helpful.

© Programmers or respective owner

Related posts about design-patterns

Related posts about examples