What I have done is create a static class Address and interface IAddress like the Assignment class in PTracker. Then I create the necessary Editable Child BOs like EmployeeAddress and CustomerAddress that implement IAddress.
E
This is a very tricky problem and this is what we do.
Addresses act as immutable objects. That is, 2 Park Avenue Floor 24 NY, NY 10012 is an address. It represents that location. Now, if Joe works there, and changes jobs, it doesn't change the address. It has Joe pointing at a different address.
So, we end up having what is called a ProfileAddress child BO which is a usage of an Address object, much like a ProjectResource is the usage of a Resource in the project tracker demo. Address is an editable root but with only read-only properties and a factory method that contains the information used to create new addresses.
Of course, you need to consider duplicate checking here as well, which is something that I need to consider more deeply myself. There were certain products out there such as Melissa Data which I kind of drool at because they help provide the DPV - kind of a unique ID for an address, help clean up the address, assign the zip-4 plus various other information. But too expensive at this stage.
Good luck,
Chris
skagen00:Addresses act as immutable objects. That is, 2 Park Avenue Floor 24 NY, NY 10012 is an address. It represents that location. Now, if Joe works there, and changes jobs, it doesn't change the address. It has Joe pointing at a different address.
skagen00:Good luck,
Copyright (c) Marimer LLC