PDA

Click to See Complete Forum and Search --> : Noob Middle Tier Question


JamesM
Aug 13th, 2001, 09:01 PM
I have an address book app. It has 2 tables, 1 for New Contacts and one for New Phone Numbers.

As a new contact is added, one or more numbers may be added associated with that contact. E.g Add Contact Joe Smith, Then Joe has a work and home number which are added to the phone number table.

I have the app up and running but only in 2 tier format.

If I want to create objects to handle access to the db server, what objects should I use in this circumstance?

For example should I have a contact object and a phone number object?

SoftwareMaker
Aug 14th, 2001, 12:22 AM
Yep...Sounds fine and Good to me.

PhoneNumber object to validate entered numbers and contact object to validate addresses or emails.

If both are gonna be relatively small classes...think about including both classes in a single component called ContactInfo or something

You will save resources by just instantiating one component instead of two...