Friday, September 30, 2011

WebSockets + Long Polling + SignalR === Awesome;

Steps for creating a chat client using ASP.net 4.5 :

1) Install Visual Studio 2011 Developer Preview (download)
2) Install NuGet Package Manager (download)
3) File -> New -> Project
clip_image002[1]
4) Right Click on References -> Manage NuGet Packages
clip_image004[1]
1) Search “SignalR” and install the package
clip_image002[3]
2) Add 2 files “Default.aspx” and “Chat.cs” and change the code as below:
clip_image004[3]
(*Note : I am referring to my C# type and methods in Javascript )
3) Done.
clip_image006[6]
You may think this is trivial but believe me, it isn’t ..

This is the most exciting piece of technology that I have seen so far from BUILD (offcourse after Windows Native Apps in HTML5 & Javascript) so I would encourage everyone to start playing with VS 2011.
And if you haven’t seen yet what happened in BUILD than I would strongly recommend you see it here.


Web development is taking a whole new perspective with HTML 5 and Javascript . . . .

AddIn