Re: Long Life Objects



Responding to Timeisfire8...

The problem lies with the creation of my design's long life objects.
They are virtually all Dictionary objects acting as 'look-ups' for
various 'type' data. For example, I have one for AddressType with
AddressTypeID as the Key for a corresponding AddressType object. An
AddressType object is contained as an attribute of an Address object.
As these dictionaries are used for the lifetime of the application, I
have decided to create them all at application start-up.

An extract of my start-up object creation is as follows (---
represents 'creates & contains'):

PlaceOrderHandler --- Company --- Dictionary<Customer> ---
Dictionary<Address>
--- Dictionary<Contact>
--- ServiceCatalogue
--- Dictionary<ServiceType>

Please note that Company is a single instance and represents the
organisation running the application.

I am getting hung up on the terminology here (e.g., "Dictionary"). It sounds very much like you are trying to emulate an RDB and the Dictionaries are just surrogates for table indices. If so, that is not a very OO way of doing things. So let's go back to basics.

What problem is the application trying to solve?

Is this what the problem space looks like?

1
[Company] ----------------------+
| 1 |
| |
| R1 | R4
| |
| has | references
| * | 1
[Customer] [ServiceCatalogue]
+ customerID | 1
| 1 |
| |
| R2 | R5
| |
| has | organizes
| 1 | *
[ContactInfo] [Service]
+ phoneNumber + serviceID
+ eMailAddress
| 1
|
| R3
|
| includes
| 1
[Address]
+ street
+ city
+ state



*************
There is nothing wrong with me that could
not be cured by a capful of Drano.

H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
"Model-Based Translation: The Next Step in Agile Development". Email
info@xxxxxxxxxxxxxxxxx for your copy.
Pathfinder is hiring: http://www.pathfindermda.com/about_us/careers_pos3.php.
(888)OOA-PATH



.



Relevant Pages

  • Re: Long Life Objects
    ... customer in an AddressType dictionary. ... every object is clearly a problem space entity while ... delivery address created for any customer from that point on would be ...
    (comp.object)
  • Re: Long Life Objects
    ... Thanks for your continued detailed posts Lahman. ... customer in an AddressType dictionary. ... every object is clearly a problem space entity while ...
    (comp.object)