× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> Climbing back up one level, this means that your original
> assumption of
> having a container of records from your result set is
> simply the wrong
> approach.  Instead, you have a business object which may
> or may not have a
> collection of other business objects.  Those objects
> populate themselves
> through the data tier, which in turn decides which tables
> and columns (and
> which machine, which network, which data medium) are used
> to load the data
> object's attributes.

Thanks Joe.  This is the paragraph that makes the most, and
least sense to me.  I understand the tierring, but I'm
having a hard time putting it into practice.  I wasn't
suggesting using a result set as a container.  It sounds
like that is what you assumed.  Here's an example of what I
meant...

Let's say for example I have an Item class that represents
and Item.  Then I have an ItemList class that is my
container.

How I would load this object is in my ItemList class,
retrieve the data from the DB and for each "record" in the
file, build a Item object, then add it to the ItemList
object.  Something like this:

Class ItemList {
  Vector itemList = new Vector();
  ..
  ..
  public void load() {
    while (records exist) {
      Item item = new Item(getString(ITEM));
      item.setDescription(getString(DESCRIPTION));
      ..
      this.itemList.add(item);
    }
  }
}

Since the ItemList is as basic as a class as my application
has (like you said, it may or may not be a collection of
other business object(s), in this case it's not), is this
what you are saying should happen.

So, the application programmer would create the ItemList and
Item classes, allowing the business programmer to use them.

So, before the ItemList class is even created, the
programmers get together and decide which attributes should
be available in the Item class.  Then, the application
programmer uses this information to build the Item class,
and then builds an ItemList class so the business programmer
can use which in turn is the deciding factor as to which
fields will be used in the data retrieval (SQL, etc..).

Close?  Cigar?

Brad


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.