|
Prev: File reading and file writing
Next: Call for Papers Reminder: The World Congress on Engineering WCE 2007
From: Dmitry A. Kazakov on 24 Feb 2007 03:33 On 23 Feb 2007 12:19:23 -0800, Nathan wrote: > So would you advocate keeping the high level engine class as a > 'controller' that can handle the deletion of the object regardless of > when the actual data was deleted? Yes. Further "actual data was deleted" is poorly defined. Does it mean an incoming deletion request, disappearance of the last reference to the target object, finalization of the later? IMO one of the design goals is to define the precise meaning of "Delete." -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de
From: H. S. Lahman on 24 Feb 2007 13:02 Responding to Nathan... > Interesting what you say about the factory handling deletion, I'd > never heard of that. Yeah, I've never understood why it doesn't get more press. It seems pretty obvious, given OO encapsulation, though. The rules and policies of instantiation (Who) are usually different than those of collaboration (What & When), so it makes sense to encapsulate them away from individual collaborations via "factory" objects and patterns. But the rules and policies of de-instantiation are pretty much a mirror image of those for instantiation. In addition, one is dealing with exactly the same concerns: referential integrity (relationships) and data integrity (initialization and availability). One uses objects to encapsulate logically related concerns. So where else would one put that logic? ************* There is nothing wrong with me that could not be cured by a capful of Drano. H. S. Lahman hsl(a)pathfindermda.com Pathfinder Solutions http://www.pathfindermda.com blog: http://pathfinderpeople.blogs.com/hslahman "Model-Based Translation: The Next Step in Agile Development". Email info(a)pathfindermda.com for your copy. Pathfinder is hiring: http://www.pathfindermda.com/about_us/careers_pos3.php. (888)OOA-PATH
First
|
Prev
|
Pages: 1 2 Prev: File reading and file writing Next: Call for Papers Reminder: The World Congress on Engineering WCE 2007 |