Async factory methods not used in WPF

Async factory methods not used in WPF

Old forum URL: forums.lhotka.net/forums/t/9270.aspx


triplea posted on Sunday, July 25, 2010

Apologies if this has already been discussed/explained before but (unfortunately) I have been out of CSLA action for quite a while and only using Windows Forms.

I like the factory methods in SL using the callback. But looking at the samples I do not see these used in WPF but solely in SL. Is there any reason for this?

ajj3085 replied on Sunday, July 25, 2010

The async factory stuff was added to support silverlight, which requires such calls to be async.  So there's no choice there.  In Wpf there is no such requirement, however I don't believe there's any reason you couldn't use the async factory calls in Wpf either, except that the sync methods are easier to code against.

RockfordLhotka replied on Monday, July 26, 2010

The async data portal and factory concepts are available in WPF. I tend to use them in both SL and WPF, because I prefer the resulting UI feel - but of course it does mean you have to do all the UI stuff in WPF that you need to do in SL to deal with the data access (and very likely some business rules) being async.

All the stuff I discuss in the CSLA 4 MVVM video series is async. And while the sample is in Silverlight, the same code constructs work in WPF.

Copyright (c) Marimer LLC