Tuesday, August 23, 2005


Newsgroups: borland.public.delphi.oodesign
From: "Joanna Carter"
Date: Sat, 30 Aug 2003 08:46:35 +0100
Local: Sat, Aug 30 2003 3:46 pm
Subject: Re: Opinions wanted

The validation of objects can happen in many different places and ways.

In the case of an Sales Order , the issue of cascading occurs when the Order is deleted and, because it owns the Order Lines, so should they. Such a cascade rule is enforced in the Order itself as it is solely responsible for the lifetime management of its owned objects.

In the case of a Customer and its Orders, the deletion is not a function of the Customer but of a 'Manager'; There may be rules that state that Orders have to be kept in archive rather than truly deleting, this kind of functionality could well be the domain of an Order Book class.

Certainly all classes in a system are not persistent and that is where the table metaphor is most lacking. You also need 'rules' and 'manager' classes which are not persistent and that have nothing to do with the management of collections of objects (tables).

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?