Offline capabilities

Topics: CAB & Smart Client Software Factory
May 31, 2006 at 12:20 PM
originally posted by: dirtysanchez33

Hi,

I want to reiterate some of the concerns posted in this forum regarding the lack of 'Guidance' support for developing online / offline smart client implementations. Since the Smart Client Offline Application Block was written for .net 1.1 and is tangled up with the old Caching and exception 1.0 application blocks, it seems like this block isn't really ideal to using in conjunction with Enterprise library 2.0. Also, since offline / online capabilities IS the hallmark of a smart client application, it would be nice to see some guidance either in the form of documentation or code in this area. The offline block is quite nice, but it is too tangled up in the old caching block to be quickly customized to work with the new caching block in Ent Lib 2.0. Can anyone at microsoft provide ideas for implementing offline capabilities or is there going to be a release of the Offline Block for .net 2.0? Thanks, and generally great work with the app blocks!
Jun 1, 2006 at 8:10 PM
originally posted by: askew

This message thread addresses the Connection Manager functionality:

http://www.gotdotnet.com/codegallery/messageboard/thread.aspx?id=941d2228-3bb5-42fd-8004-c08595821170&mbid=62788f36-a963-4feb-8470-20f1a844ed2a&threadid=b1d9f7bd-0349-47f4-a44b-7809567ffe7a

I would use the 1.1 Offline Block as reference for guidance with my Connection Manager...

Now the harder part: store and forward. There is guidance for this but no recipies, etc. Too many valid ways to implement this to have one-size-fits-all. There can be too much 'guidance'.

I plan to use XML messages and Web Services that will be 'stored and forwarded'. From here they can be put in a database or stored in local files, msmq, caching block, etc. I would use the 1.1 Offline Block as reference here too in designing the message and payload classes... Asynchronous messages, and there is plenty of guidance for that too.

I think not providing an Offline Block 2.0 was considered a 'best practice' at the end of the day.

Here is a thread with suggestions on how to implement a Service Agent as similar to what we remember from the 1.1 Offline Block.

http://www.gotdotnet.com/codegallery/messageboard/thread.aspx?id=941d2228-3bb5-42fd-8004-c08595821170&mbid=62788f36-a963-4feb-8470-20f1a844ed2a&threadid=99e07ae0-0961-4514-bca3-d3fd03dce344

kozaczynski said:

I would apply the following simple sequence

- use the web service proxy generated by the VS and hook it up directly to the model (and show elements of the model in the view, for example)
- once this is working, create the smart proxy in front of the web proxy to call the service asynchronously (use the Add Smart Web Reference Recipe to do that). After you get the data via that proxy, hook it back to the model
- once this is working and if you need it, create a service agent in front of the smart web proxy.

In general you need a service agent if you must cache the data, do data transformation or validation, or expose a different interface to the web service (for example to localize the changes if the service changes). If you are not doing any of that, you don't need a service agent.

In general you need a smart web service proxy if you want to call your service asynchronously and handle the timeout.