13. July 2013
Asp.Net , C# , SignalR
SignalR is new buzz in development technology. It is not going to replace asp.net but works for asp.net. It is a technology ( in more technical words it is a library) that facilitate us to add real-time functionality into our asp.net based applications. It is very useful where high time/real time update is required like online group gaming, chat, stock trade etc.
If it is for just providing real-time web functionality, then why not to go for HTML5 and use its WebSockets API. Well, you can. But, WebSocket is not going to provide a complete solution. What if user is using a browser that is not supporting HTML5?
Well, so internally what is done in SignalR ? Does it use something other than WebSocket? The answer is Yes and No. Yes because it really use WebSockets with HTML5 compliant browsers. In case of non-HTML5 supported browsers it uses other techniques. Thus, we need not to write client/browser specific asp.net code as SignalR automatically take care of it. It first look for WebSocket to use bi-directional communication and in case of its unavailability it uses other kind of mechanism.
In addition to these, SignalR comes with API that we can use for server to client RPC.
Now, applications are being developed so that we needn’t to refresh our web page to see fresh data. Its get automatically. You may have noticed your Facebook page( I am not saying that Facebook uses SignalR but trying to explain the current fashion of web applications)
Microsoft’s asp.net has good resources for starting and using SignalR, that can be seen here - Getting Started with ASP.NET SignalR