This isn't specifically a .NET question because it
could apply to any OO development but since I'm
developing in .NET I'm interested in the answer
specifically as it pertains to .NET.

If I have a class (we'll call it Product) that has a
number of scalar properties and a data access class
(we'll call it ProductData) that extracts the Product
data from the DB and then passes it back to Product,
is it better to stuff all the properties into a
Hashtable or ArrayList to send back to Product for
initialization, or is it better to initialize the
Product from within ProductData and pass it back?

On a similar vein, if I have a class ProductCategory
that contains properties of its own including a
collection of Product objects, is it better to pass
Product and ProductCategory objects between the
business and data access objects or to again parcel
them up as a collection and then pass them?

I'm not sure if there is a resource advantage to using
the Hashtable/ArrayList as opposed to
Product/ProductCategory, is there an inherent size
difference between Collection classes and custom
classes, and would this even matter if both the
Product and ProductData objects resided on the same
machine?

Sorry if this sounds scattered; I'm trying to come up
with a coherent standard to use in these situations
that I can document for my team.

Thanks in advance,
Anye Sellers

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to