Re: What databases have taught me

From: Robert Martin <unclebob_at_objectmentor.com>
Date: Fri, 30 Jun 2006 20:25:53 -0500
Message-ID: <2006063020255377923-unclebob_at_objectmentorcom>


On 2006-06-28 10:47:22 -0500, "Aloha Kakuikanu" <aloha.kakuikanu_at_yahoo.com> said:

>
> Robert Martin wrote:

>> On 2006-06-23 11:10:25 -0700, "Aloha Kakuikanu"
>> <aloha.kakuikanu_at_yahoo.com> said:
>>> Order.cancel()? This is really about canceling a transaction. You have
>>> to study transaction management in order to implement this
>>> functionality correctly. Inheritance and polymorphish doesn't help
>>> here, sorry.
>> 
>> Again, this depends.  If there are several different types of customer
>> (e.g. GovernmentContractor, privateContractor, foreignContractor) you
>> might find that each of these different types must follow a different
>> procedure in order to cancel an order.

>
> To cancel a transaction you have to rollback or compensate all the
> actions -- as simple as that. Objects/classes are irrelevant.

If you are talking about a shor-term database transaction, then I agree. However, undoing long term transactions can require a large amount of work.

-- 
Robert C. Martin (Uncle Bob)  | email: unclebob_at_objectmentor.com
Object Mentor Inc.            | blog:  www.butunclebob.com
The Agile Transition Experts  | web:   www.objectmentor.com
800-338-6716                  |
Received on Sat Jul 01 2006 - 03:25:53 CEST

Original text of this message