Re: Long Life Objects
- From: "H. S. Lahman" <h.lahman@xxxxxxxxxxx>
- Date: Tue, 27 Mar 2007 16:21:10 GMT
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
.
- Follow-Ups:
- Re: Long Life Objects
- From: timeisfire8
- Re: Long Life Objects
- References:
- Long Life Objects
- From: timeisfire8
- Long Life Objects
- Prev by Date: Re: OO and Extending (Was: Is Procedural Paradigm a basis of OO Paradigm?)
- Next by Date: Re: OO and Extending (Was: Is Procedural Paradigm a basis of OO Paradigm?)
- Previous by thread: Re: Long Life Objects
- Next by thread: Re: Long Life Objects
- Index(es):
Relevant Pages
|