Offline capabilities

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


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 7:10 PM
originally posted by: askew

This message thread addresses the Connection Manager functionality:

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.

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.