2

We are building web system that consist on AngularJS as client side and MVC 4 Web Api as server side. One of the main requirements is that at AngularJS client, once the user session is authenticated, user should be able to use application in offline mode. For that purpose we decided to use Web SQL Database at client side, to cache all user action while he is offline. Once he becomes online all data will be synced with server DB. We are planning to use timestamp mechanism to ensure that all data is synced properly.

But synchronisation must be done in two ways, from local db to server DB (which will occur when user becomes online) and from server to local db, always when data on server is changed. The question is: What is the most efficient way for server to tell web browsers, that data has been changed?

SignalR seems like pretty good solution, but it requires usage of JQuery, and since we are using AngularJS at client side, this is not a good idea. Are there some other possible mechanisms for this requirement?

Ivan Alek
  • 1,899
  • 3
  • 19
  • 38
  • 2
    angular have a light version of jquery : jqlite. But for edge cases like using a jquery plugin, you can totally load jquery in angularjs, angular will use il automatically instead of its jqlite. – Jscti Apr 15 '14 at 15:08

0 Answers0