Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Smart Client Offline Application Block is now live on MSDN.
msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/offline.asp
This block has re-usable code and samples which show how you can build smart client applications which can operate offline. With this block your application can detect the presence or absence of a network connection, cache data for use while offline, and re-synchronize data and tasks with the network once the application goes online.
The block uses a store and forward mechanism which is suitable for message-based interactions with the network, such as you would get with a smart client operating in a service oriented environment. This is a very flexible model and doesn’t require the kind of tight integration between client and server you find with database merge-replication approaches to offline…
Comments
- Anonymous
March 01, 2004
Hows does the block detect the presence or absence of a network connection? - Anonymous
March 01, 2004
The Smart Client Offline Application Block is now live on MSDN. - Anonymous
March 02, 2004
Greg,
I downloaded the block last night and was reading through the documentation, I beleive it said that the developer will need to implement that specific piece (online / offline detection). It looks to me to be a much more involved wrapper to the caching application block that queue's up actions for re-connection, etc. I may be wrong but that was my inital take on it.
Paul Tyng - Anonymous
March 02, 2004
I'm not entirely correct, what I was reading about was the custom detection, the block comes with a default implementation of connection detection:
"The default connection detection provider uses the InternetGetConnectedState method of the WinInet dynamic-link library (DLL) to detect connection state changes. For example, if you remove the network cable from a computer that is connected to the network while running the sample, the connection state displays the change to offline mode."
[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/offline-ch03.asp] - Anonymous
March 02, 2004
Yes - the block includes a default implementation which tells you whether there is a network connection or not. This may suffice for simple cases but, in general, you may want to implement something more suitable for your application.
Having a network connection is a necessary but not sufficient condition to being online. Even with a network connection you can't be sure that the service you are trying to get to is available - if the service is not available, you are essentially offline despite being connected to the network.
Using the pluggable architecture of the block, you can implement a more meaningful offline state detection mechanism. For instance, you could periodically ping the required service, though arguably this is pretty inefficient and inelegant. - Anonymous
March 02, 2004
Last month Microsoft released a new application block. This application block of re-usable code and samples, can be used to model your own applications to allow them to detect the presence or absence of a network connection, cache data for use while offline, and re-synchronize data and tasks with the network once the application goes online. - Anonymous
April 03, 2004
Hey I was just cruising the blogs and am not really up to speed on the smart client stuff.
<TABLE ALIGN="CENTER" BORDER="1">
<TR>
<TD>Using the pluggable architecture of the block, you can implement a more meaningful offline state detection mechanism. For instance, you could periodically ping the required service, though arguably this is pretty inefficient and inelegant.
</TD>
</TR>
</TABLE>
A general approach that can work here though is to ping whenever a network connectoid becomes connected or disconnected. Ping the desired resource source, maybe authenticate the desired resource source if you care about a spoofed connected state. Its hard to have a generic connected/disconnected detector because the network of interest varies.