문제

As title says, I will be developing an asp .net web-application all geared around displaying data. This data will change many many times through the day, so it's a matter of time before what the UI is displaying is expired.

What's the way around this problem? Polling? Timed 'refreshes'? Ajax? I want to avoid having to tell the user the only way to display upto date data is to hit refresh.

EDIT: I've just stumbled upon knockout framework - could this be a candidate for solving this problem? Can knockout detect changes from an sql database and reflect these accordingly on the UI?

도움이 되었습니까?

해결책

Take a look at SignalR, it's a framework like socket.io for node.js (if you're familiar with that concept.) Essentially, it's a high level channel architecture for communicating in "real time" between the server and the client, in both directions. It uses web sockets, if possible, and fall backs to long polling ajax.

By using SignalR the server can simply tell all relevant clients whenever some data has changed

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top