Asynchronous Fetching?

Posts   
 
    
acradyn
User
Posts: 57
Joined: 03-Apr-2004
# Posted on: 03-Apr-2004 17:57:59   

I searched and didn't find anything that discussed implimenting asynchronous fetching. I would like to use llblgen in a WinForms app with the ability to fetch and load collections asynchronously.

Do you have any implimentation suggestions? This MSDN article (link below) is making me think I should write a wrapper around DataAccessAdaptor and make an asynch version.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/SACP_WinForms.asp

Thanks for any ideas.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 03-Apr-2004 18:05:32   

You can create an asynchronous fetching layer already with the current code. Your fetch thread should do the fetching, based on a message received from the gui for example. Once the data is delivered, the fetch thread is invoking (thus, delegate and data) the gui method (main thread method) that it's done. You can also construct this differently of course, with a queue for example).

So indeed, you could implement this with a wrapper around the DataAccessAdapter class, however I'd opt for a thread which consumes the DataAccessAdapter instance.

Frans Bouma | Lead developer LLBLGen Pro
acradyn
User
Posts: 57
Joined: 03-Apr-2004
# Posted on: 03-Apr-2004 18:40:27   

I agree, that sounds better. Thanks for the quick response.

P.S. I wish I had LLBLGen two years ago when .NET was released. It would have saved me a ton of time. I'm a big fan of it and I'll be using it for all of my projects!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 03-Apr-2004 21:44:44   

acradyn wrote:

I agree, that sounds better. Thanks for the quick response.
P.S. I wish I had LLBLGen two years ago when .NET was released. It would have saved me a ton of time. I'm a big fan of it and I'll be using it for all of my projects!

smile thanks!

Frans Bouma | Lead developer LLBLGen Pro
swallace
User
Posts: 648
Joined: 18-Aug-2003
# Posted on: 05-Apr-2004 19:01:14   

Say, how about posting that wrapper or thread once you've created it? I'm sure many people would like to see a good example of that.

Thanks!

ctadlock avatar
ctadlock
User
Posts: 60
Joined: 12-Feb-2004
# Posted on: 21-Apr-2004 08:23:08   

A great example of an asynchronous wrapper is the code that is generated when you add a web reference in VS.NET.

CT