to me a collection is very similar to xml.  I can maintain collections
within collections.  Just what I want to do.

A Customer object could have an Orders collection to it that define thw
Who, what, When, IsPaid that we all want to know.

An invoice will have the Customer Object that maintains the shipto data
separate from the billto data.

I just like them and feel that are fantastic.  I can also pass them from my
system to another via a web service.

I don't work with VFP much at all.  So the C005 issue is one I remember
from the old days.  In .Net collections data bind to just about anything.
 I can query them via linq and that output can be consumed anyway I want or
need.  I can query against db data as well if needed.




On Fri, Apr 5, 2013 at 9:47 AM, Christof Wollenhaupt <
[email protected]> wrote:

> > The collection seems so much more flexible than dealing with an array.
>
> In VFP it isn't really... Let's see:
>
> Multiple columns: Not supported. You need an object based on EMPTY as a
> collection item, then use ADDPROPERTY() to assign values. Or create a class
> and add an instance.
>
> Sorting: Only one column supported which has to be the key column. No way
> to sort after properties in the item object.
>
> Inserting: Not supported. You can only append at the end.
>
> Pass to array functions in VFP such as APRINTERS(). Not supported. Only
> arrays are supported by native functions. A noticeable exception is using a
> collection as a recordsource in a list box.
>
> Searching: Not supported. You need to iterate through all objects and
> search manually.
>
> Stability: If you forget the FOXOBJECT (aka NOCRASH) clause in a FOR EACH
> loop, you are causing a C5 error.
>
> Performance: Collections are several times slower than arrays
>
> Memory usage: Collections need more memory than arrays and cause higher
> fragmentation
>
> Persistence: Collections can not be stored to disk with a single command.
> An array can be saved.
>
> Of course, there are some pros, too:
>
> - Collections can be used as an associative array which can be accessed by
> key name rather than index.
> - Collections can be more easily passed around, because they do not require
> by reference passing.
> - Item properties are more readable than column indexes
> - Item can be arbitrary elements and each one can be different.
> - Native concept of being empty.
>
> --
> Christof
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cajidmykvx-anyqmytyrvqoyjk0h+1dr2qlt+x2hcdhafdug...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to