locked
semi connected sql data

    Question

  •  I have a windows 7/ windows phone 7 sql data (perst db on phone) app using wcf service and local data storage, that I would like to re write for html5 java script, for windows 8. My scenario how ever is that the app is a mobile app. designed to be used in the field. So there are scenarios that would arise that the app would not have internet access, for a wcf service but would still need to be functional. Would it be possible to write a metro style app so that it could create orders edit customer info etc... in a dis connected state and then when an internet connection was available it could then sync data with the server?

    Thanks Jon


    Thank You Jon Stroh

    Thursday, February 7, 2013 11:38 PM

Answers

  • Jon,

    This is definitely possible. There are many different ways you could architect it, but one way or another you'll need a local copy for your offline state. I personally have used SQLite accessed through a C# Windows Runtime component. It's not super easy/straight forward to setup, but there's a lot of material out there to guide you through it. After you have it setup, its actually really nice and easy to deal with.

    As for checking whether your online or offline -- this is also really easy. There are even some libraries to make it even easier like Eight.js.

    Hope that helps!

    • Marked as answer by JonStroh Monday, February 11, 2013 1:35 PM
    Friday, February 8, 2013 5:08 AM
  • Hi Jon,

    In addition to got.dibbs's suggestion, for detecting network connectivity, there is built-in network inforamtion API in windows store app (windows runtime library):


    #Quickstart: Retrieving network connection information (Windows Store apps using C#/VB/C++ and XAML) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh452991.aspx


    #Quickstart: Managing connection events and changes in availability (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj835820.aspx


    or you can use your own code to detect the service connectivity by issuing some test operation calls to the service.

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by JonStroh Monday, February 11, 2013 1:35 PM
    Monday, February 11, 2013 6:12 AM
    Moderator

All replies

  • Jon,

    This is definitely possible. There are many different ways you could architect it, but one way or another you'll need a local copy for your offline state. I personally have used SQLite accessed through a C# Windows Runtime component. It's not super easy/straight forward to setup, but there's a lot of material out there to guide you through it. After you have it setup, its actually really nice and easy to deal with.

    As for checking whether your online or offline -- this is also really easy. There are even some libraries to make it even easier like Eight.js.

    Hope that helps!

    • Marked as answer by JonStroh Monday, February 11, 2013 1:35 PM
    Friday, February 8, 2013 5:08 AM
  • Hi Jon,

    In addition to got.dibbs's suggestion, for detecting network connectivity, there is built-in network inforamtion API in windows store app (windows runtime library):


    #Quickstart: Retrieving network connection information (Windows Store apps using C#/VB/C++ and XAML) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh452991.aspx


    #Quickstart: Managing connection events and changes in availability (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj835820.aspx


    or you can use your own code to detect the service connectivity by issuing some test operation calls to the service.

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by JonStroh Monday, February 11, 2013 1:35 PM
    Monday, February 11, 2013 6:12 AM
    Moderator
  • Thanks guys!  You suggestions are very helpful, now I have a starting point. I am thinking  I am going to use the DevExpress Dextreme js html widgets so I can hit all devices (iphone,ipad,android,win8)with one code block, but its a tough choice to move away from my comfort zone c#. So the jury is still out on that.

    Thanks Jon


    Thank You Jon Stroh

    Monday, February 11, 2013 1:44 PM