Persist or not persist : comment
Thu, 21 Oct 1999 17:31:26 -0700
> From: Laurent Martelli [mailto:firstname.lastname@example.org]
> Subject: Re: Persist or not persist : comment
> >>>>> "Billy" == btanksley <email@example.com> writes:
> >> From: Thomas M. Farrelly [mailto:firstname.lastname@example.org] 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.
Ah, excellent point. So it sounds as though 'save' will be the user's name
for the action, then. We don't want to borrow vocabulary inappropriately.
Although, come to think of it, it's not TOTALLY inappropriate: the 'save'
action really does produce a reusable document. The stuff between saves is
quite likely inconsistant in the sense of textual contradictions and
mispellings. The user would only consider saving when he suspected that the
document was ready to publish ("consistent").
But I think you're more right than I was. We shouldn't use 'commit' at this
level, when it already has a well-established meaning at a lower level.
> Laurent Martelli