General information
Category:
The Mere Mortals Framework
Title:
(OOP) Part Time Composite Objects?
Because my actual problem domain is complex*, I'm going to use Invoices and Line Items as an example. An Invoice business object deals with everything Invoice, and a LineItems business object performs likewise. LineItems is useful by itself. Invoices is also useful by itself. Invoices often, but not always, uses a LineItems object - Total cost of an invoice is a function on Invoice, but can only be performed by summing LineItems.
The framework makes it fairly easy to drop a new bizobj on a form and hook it into the chain, but running the containership heirarchy is sometimes problematic. And, it means some functions wouldn't work from a programmatic interface, as they might not have the child object required. That would be a nice ability to have.
Is there an easy way to have the child objects available when I want them, without dragging them around all the time? Instantiation time and object count are a concern.
Chris.
*Complex: Three or four "children" business objects, sometimes two or three layers deep. And no, it doesn't simplify to smaller trees gracefully.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only