Persist or not persist : comment

Laurent Martelli
22 Oct 1999 00:36:04 +0200

>>>>> "Billy" == btanksley  <> writes:

  >> From: Thomas M. Farrelly [] Subject:
  >> Persist or not persist : comment

  >> So, in a persistent system there is nothing such as "save",
  >> because you are _never_ operating on a copy of an object, _only_
  >> real objects. Objects change if you change them and are permanent
  >> - they last as long as their context.

  Billy> I agree.

  Billy> At the same time, a 'Document' object would be expected to
  Billy> have a 'save' method (perhaps "commit" would be a good name)
  Billy> which simply makes all the changes official.  The user
  Billy> doesn't ever HAVE to hit that button marked Save, but they
  Billy> certainly can.

I don't think `commit' should be a method of document. This action
introduce the notion of transaction : you don't want other people to
see your document in an unstable state. So when you start a
transaction, only you can see the changes. And you commit it, every
body can the see the changes. You commit the transaction in which you
modified the document, not the document itself.

Laurent Martelli