Hi Aaron,

Thanks, that makes perfect sense. I do think our apps might be overusing 
ERXBatchingDisplayGroup a bit. ;-)

Regards,
Mark

On Oct 12, 2017, at 8:17 AM, Aaron Rosenzweig 
<aa...@chatnbike.com<mailto:aa...@chatnbike.com>> wrote:

Hello Mark,

Your question is sound, thanks for asking it.

All display groups “batch” - in that they allow you to show perhaps 10 objects 
at a time and maintain “forward” and “previous” page views.

I maintain that “ERXBatchingDisplayGroup” is poorly named and for your purposes 
you should switch to “ERXDisplayGroup”

You see… the average display group fetches all objects into memory. If this is 
5,000 records, no big deal. If this is a million records, might start to suck. 
Regardless… the average display group fetches all objects but then shows a 
handful at a time.

An “ERXBatchingDisplayGroup” is not an average display group. It is hiding a 
“top n query”

You would use this “non average” display group when you want to give the feel 
of random access to a rather large result set. You would do this because even 
though it may represent 10 million records it only fetches about 100 of them at 
any given time and then displays perhaps ten of them on the page. It is very 
good with memory but you don’t have all the objects at your fingertips.

Cheers,
Aaron Rosenzweig / Chat 'n 
Bike<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.chatnbike.com&d=DwMFaQ&c=BNNF-YNv0CLLslhP2Bcx5Q&r=R0ZqsewJs3eSJk7vLCqZv0r5kJlLXQLnGTeg9t8MlqA&m=7cQWys-p8TkX1tVJs5krosq_zf43j4SKf9JJeXq6KDI&s=usWZAX9T7RMIXJaa0puxwRPl5R2kOIwzF1e9yZ5GYsU&e=>
e:  aa...@chatnbike.com<mailto:aa...@chatnbike.com>  t:  (301) 956-2319
[Chat 'n Bike]  [Chat 'n Bike]

On Oct 11, 2017, at 11:42 PM, Morris, Mark 
<mark.mor...@experian.com<mailto:mark.mor...@experian.com>> wrote:

Hi all,

From some iffy experiences with them back in the WO 3.1 days, I’ve always 
avoided display groups, using my own batching/paging logic. But now I’m having 
issues with an existing ERXBatchingDisplayGroup, and I’m not sure what’s going 
on.

displayedObjects() is working fine, and contains the records I expect. 
allObjects() however returns a FakeArray object, containing an equal number of 
NSKeyValueCoding.ErrorHandling placeholder objects as the total count I expect. 
I see some private and protected methods that look like they might force 
allObjects to update but nothing public, and I see that an EOEditingContext 
save or revert will probably also do the same. However, I don’t see how to just 
ask an ERXBatchingDisplayGroup for all of its objects, without changing the ec.

Perhaps given the batching nature I shouldn’t be doing this, and instead I 
should just go back to the dg’s data source? Any thoughts or advice is welcome!

Regards,
Mark

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      
(Webobjects-dev@lists.apple.com<mailto:Webobjects-dev@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.apple.com_mailman_options_webobjects-2Ddev_aaron-2540chatnbike.com&d=DwMFaQ&c=BNNF-YNv0CLLslhP2Bcx5Q&r=R0ZqsewJs3eSJk7vLCqZv0r5kJlLXQLnGTeg9t8MlqA&m=7cQWys-p8TkX1tVJs5krosq_zf43j4SKf9JJeXq6KDI&s=WjYqs5joCvaXXCrk4NYsDqKfIRmRQ7udrbrY5COlT0Y&e=>

This email sent to aa...@chatnbike.com<mailto:aa...@chatnbike.com>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to