Re: Long Life Objects
- From: timeisfire8@xxxxxxxxxxx
- Date: 27 Mar 2007 13:45:03 -0700
Hi Lahman
Thanks for responding. I enjoy reading your posts and understand at
least 9% of them with my current knowledge :-)
What problem is the application trying to solve?
It is a warehouse application that includes a basic contact management
element. One Use Case extract might be "A Customer Contact phones the
Company to order a next day delivery Service for a stored pallet of
goods."
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.
So I am. One of your other posts taught me the valuable lesson of
solving the problem without considering RDB persistence, which should
be handled in isolation. Before this I would drive the design from the
database and I now see how this is a poor approach. I suppose that the
reason I have unwittingly created an application RDB is because my
thought process for the implementation of the Use Case above, for
example, is:
1) I will need the Customer, Contact and Service(next day delivery)
objects for this problem.
2) All entities are persisted in my RDB using a surrogate key of type
int which is also used as the materialised entity's ID, i.e.
CustomerID = 87.
3) These entities are rarely updated but frequently read so I will
place them all into a Domain layer Dictionary at application start-up
using the ID for the key, i.e Dictionary<87, customer>.
4) I can now contain these Dictionaries in the application's start-up
object (Company) without hitting the RDB until a change is notified in
some way at which point I can refresh.
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
Almost. Each Customer has many Contacts which are physical people.
Each Customer has many Addresses. A contact belongs to one Address.
ServiceCatalogue is spot on.
1
[Company] ----------------------+
| 1 |
| |
| R1 | R4
| |
| has | references
| * | 1
[Customer] [ServiceCatalogue]
+ customerID | 1
| 1 |
| |
| R2 | R5
| |
| has | organizes
| * | *
[Contact] [Service]
+ phoneNumber + serviceID
+ eMailAddress
.
- Follow-Ups:
- Re: Long Life Objects
- From: H. S. Lahman
- Re: Long Life Objects
- From: topmind
- Re: Long Life Objects
- References:
- Long Life Objects
- From: timeisfire8
- Re: Long Life Objects
- From: H. S. Lahman
- Long Life Objects
- Prev by Date: Re: OO and Extending (Was: Is Procedural Paradigm a basis of OO Paradigm?)
- Next by Date: Re: Long Life Objects
- Previous by thread: Re: Long Life Objects
- Next by thread: Re: Long Life Objects
- Index(es):
Relevant Pages
|