> My gripe with lazy loading is that it causes the
> property accessor to block while data is retrieved.

A very valid concern, we load the entire object when one property is
referenced... but not the objects pointed-to by FK object ids.  For example,
we load the entire "Customer" object, but don't load the "State" object
pointed at by "Customer.MailingStateId" until you ask for one of its
properties.

> The UI thread will block while the data is loaded synchronously.

When a UI object refers to just direct attributes of an object, that's true.
When we're filling a choice-listbox, we provide an optimized stored
procedure so we can bind to a dataset.

> I'm not quite sure of when you should use properties vs. methods

Owning vs. containing, for me.  Mind you, the persistent framework is only
used for our (very) thick client program, which is deployed in store
clusters of one database server and 5-6 client machines on a dedicated
network.  It's NOT what we do for the Web-facing or back-office pieces,
since those are not as "smart".

Marc

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to