If you want a completely different take on this, have a look at the mix video, EX15 - Build Your Own MVVM Framework (Rob Eisenberg). He is of http://caliburn.codeplex.com/Wikipage fame.
http://live.visitmix.com/MIX10/Sessions/EX15 The video is very interesting in itself, and although I am not 100% sure I am sold on the coding by conventions approach, it is very clever. However, the relevant part to this discussion is that he demonstrates a very interesting technique from around the 49 minute mark, where he does async calls using methods that return an IEnumerable<IResult> and 'yields' the IResult via the enumerator. It looks particularly useful for the sort of situation where you end up coding a 'state machine' handling multiple async service calls, and removes the need to do messy standard async code, such as making it threadsafe... Effectively it is an implementation of coroutines : http://en.wikipedia.org/wiki/Coroutine The next time I have a new project requiring an async service layer I am definitely going to consider this technique. On Tue, Apr 13, 2010 at 8:31 PM, Greg Keogh <[email protected]> wrote: >>Why don’t you create the proxy on each call? > > > > That might be a good idea. Historically I’ve had a copy of it for the App > lifetime, I don’t know exactly why, it just seemed to be the thing to do. > Perhaps I thought the overhead of creating the proxy was high, but I suppose > it isn’t (I’ll think about that). > > > > I actually have a “smart” proxy class that checks for failure events and > recreates itself when needed. > > > > I’ll run some experiments with a short lived proxy. > > > > Cheers, > > Greg > > _______________________________________________ > ozwpf mailing list > [email protected] > http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf > > _______________________________________________ ozwpf mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
