locked
Sync Framework 3.0 and VS2010, Silverlight 4 and WCF RIA RRS feed

  • Question

  • Are there any examples of how to get the Sync Framework Preview 3.0 working with Silverlight 4 and WCF RIA on a Sql Server DB?

    Also, should the sample projects in the CTP work with VS 2010? I'm getting some compilation errors.

    • Edited by jryutzy Tuesday, September 21, 2010 2:30 PM
    Monday, September 13, 2010 3:45 PM

Answers

  • What about the client view of the data when it switches between offline and online mode? Imaging the scenario where the client has made many local changes that are not synchronized. The view for that client is different than the one the user gets when he views the sl app in a browser. This discrepency confuses users. We never recommmend a hybrid online/offline approach for same data set. We have however seen a app that has a hybrid model of scenarios. Some scenarios are always online and some are always offliine. The only difference is that the online only scenarios are disabled when the client has no connectivity.
    Maheshwar Jayaraman - http://blogs.msdn.com/mahjayar
    • Marked as answer by Nina H Saturday, October 30, 2010 5:11 AM
    Tuesday, October 19, 2010 4:58 PM

All replies

  • No, the 3.0 preview is not compatible with WCF RIA services. You can indeed host a sync service along side a WCF RIA service but they share nothing in common between runtime and datamodel definitions.

    Regarding your second question, yes the preview is supported on VS2010. What compilation errors are you seeing?

     


    Maheshwar Jayaraman - http://blogs.msdn.com/mahjayar
    Monday, September 13, 2010 4:50 PM
  • Do you have a demo showing Silverlight, WCF Ria Services and Sync Framework working together? We are using Entity Framework, Silverlight and WCF Ria Services for our application. We want the Sync Fx features for the offline functionality. We have T4 templates that generate our POCO classes for the domain services that WCF Ria Services use.

     

    You state that WCF Ria and the Sync Framework don’t share data models. It seems almost like we have to maintain two separate data models – one for WCF Ria and one for the Sync Framework. It seems like double the work. We have 40 tables in our application and it seems like we'd have to mainitna two different ways of acessing these tables from the Silverlight application. #1) WCF Ria for connected access and #2) Sync Fx for disconnected access. I may not be thinking about this correctly. I hope I'm wrong because it seems like extra work. WCF Ria and Sync Fx could be a lethal combination if they worked together!

     

    Friday, September 17, 2010 5:59 PM
  • hi,

    Your assumption is right for the current labs release. With the current bits you must have two data models : one each for offline and online access. However this is for the current lab bits. We are actively working to check which existing pieces can be reused for the offline model so developers find the online/offline programming model consistent and easy to develop for. There is no sample showing WCF RIA and Sync Fx because its not feasible with the current bits. WCF RIA uses a network format that is not published. In addition it is meant to be a end to end development model for Silverlight based clients. The SyncFx was designed to be on open network data format so all clients and not just silverlight clients can be part of the sync topology. Having said that we are indeed actively looking at possible RIA and Sync Fx integration but there is nothing to announce on the front as of yet.


    Maheshwar Jayaraman - http://blogs.msdn.com/mahjayar
    • Proposed as answer by mjayaram Thursday, September 23, 2010 3:17 AM
    Monday, September 20, 2010 8:36 PM
  • Hello,

    Thanks for the reply. It was very helpful in helping us chart our course of action for the near future. We are doing almost 100% Silverlight development with WCF RIA services so the Sync Fx is it's current state doesn't seem to be a good fit due to the duplicate effort involved in maintaining two data models, etc. We'll definitely be on board if (hopefully when .. not if;-) ) WCF RIA and Sync Fx have synergy.

    Here are some thoughts about getting Sync Fx and WCF RIA working together:
    - Take the DomainContext retrieved from WCF RIA services and Dehydrate it locally on the client's machine - perhaps in Isoloated Storage
    - On application start, the client would need to be able to Hydrate the data stored locally into memory as long as the application is offline/disconnected
    - The client would then work with the local data until they decide to sync back up to the server. WCF RIA already knows how to detect changes on the client before pushing them back to the server. Some work would need to be done to handle conflict resolution when the user syncs back to the live system.

    Tuesday, September 21, 2010 1:20 PM
  • Sorry to be not of immediate help to your jryutzy. The integration is  unfortunately not as simple as you put it. The RIA service in addition to this also needs to be able to detect changes on the server directly and other concurrent clients and be able to detect what the current client didnt know while it was offline. Its bit more involved.
    Maheshwar Jayaraman - http://blogs.msdn.com/mahjayar
    • Proposed as answer by mjayaram Thursday, September 23, 2010 3:17 AM
    Thursday, September 23, 2010 3:17 AM
  • However couldn't it be possible to use ria services and the sync framework in common in the following way:

    As long as the SL client runs in the browser, it uses ria services to communicate with the backend.

    When the user installs SL on his local machine (out of browser) or maybe when he/she clicks a "go offline" button in the SL client, the client publishes his last changes with RIA services, takes all corresponding data offline and from then on uses the sync framework along with a offline database?

    As soon as "go online" is clicked RIA services are used.

    Has anyone have an idea if that's possible?

    It just seems to be too good to be true for me :)

    Wednesday, October 13, 2010 7:29 AM
  • What about the client view of the data when it switches between offline and online mode? Imaging the scenario where the client has made many local changes that are not synchronized. The view for that client is different than the one the user gets when he views the sl app in a browser. This discrepency confuses users. We never recommmend a hybrid online/offline approach for same data set. We have however seen a app that has a hybrid model of scenarios. Some scenarios are always online and some are always offliine. The only difference is that the online only scenarios are disabled when the client has no connectivity.
    Maheshwar Jayaraman - http://blogs.msdn.com/mahjayar
    • Marked as answer by Nina H Saturday, October 30, 2010 5:11 AM
    Tuesday, October 19, 2010 4:58 PM