I’m writing a mobile chat client for Microsoft Lync using Sencha Touch.
On the server side I’m using the JSONP-enabled WCF service from the lyncwidget codeplex project (http://lyncwidget.codeplex.com)
Upon being called, the WCF service returns any messages that were queued on the server as JSON data.
The idea is that the client(s) poll the service regularly to retrieve any new messages.
I want to implement the polling behaviour directly in my Store’s Proxy, if this is possible. So in the “ChatMessagesStore”.
Any advice on how to implement this in a neat way?
Thanks.
ps: I’m a newbie at Sencha Touch.
The best would be to extend the
Ext.data.ScriptTagProxyclass. Then have a property inside called"pool-interval"and a method that would call thesync()function and it self. Example:This way if you have multiple stores with proxy like this you wouldn’t have to bother with setting multiple
setIntervalcalls and the need to change them when you change the store’s name.