Business Objects

Point taken on having containers of objects within an object. There are
numerous patterns and designs for OO construction. I think we would all
benefit if we could see a real world example explained. I have been trying
to read some OO literature but it is always too theoretical or overloaded, I
think it would be great to have a book that takes real world scenario’s
explains them, shows the model and identifies each scenario’s pitfalls and
benefits.

Cheers

Graeme Matthew
Analyst Programmer
Mercer Investment Consulting
Level 29, 101 Collins Street, Melbourne, VIC, 3001, Australia
Tel - 61 3 9245 5352 Fax - 61 3 9245 5330
visit http://www.merceric.com

···

-----Original Message-----
From: MikkelFJ [mailto:mikkelfj-anti-spam@bigfoot.com]
Sent: Friday, 20 September 2002 9:39
To: ruby-talk@ruby-lang.org
Subject: Re: Business Objects

Now we could adapt our Invoice class to contain an Orders attribute which
is
an array of Order business objects.

I will not say this is necessarily the wrong approach, but it is a pitfall
in OO design: You have orders and invoices hence you necessarily have order
and invoice objects.

But it might be the orders and invoices were better off as database records
and what you really need is an order-processing object and an invoice
archiver object. The real inherent objects in the problem being solved are
not always obvious and it is an art to figure them out. There has been
written much litterature on how you can harvest good objects and weed out
bad objects using different strategies. I’m not convinced how well it works
following such strategies as written in a book - but one should seek to find
the nature of the problem somehow - and I guess the best approach is rather
individual.

Mikkel

__


This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail.

Thank you for your cooperation.


ec03/04