Editorials

Event Driven Programming Over the Web

Event Driven Programming Over the Web

A while back I pointed you to SignalR as a tool for performing a sort of event driven programming over the web. One of the most efficient ways to enable SignalR is the Web Socket API released by the W3C HTML5 specification in conjunction with IETF RFC 6455. All by itself Web Sockets has the potential to radically change how you program over HTTP. Running SignalR on top of Web Sockets makes application development easier.

No longer are you restricted to simple HTTP or AJAX methods. Now you can actually maintain live communications over http just as if you were inside your own local area network. Both the client and the server are able to communicate in real time. Web Sockets may be used in HTML5 compliant browsers so that there is no longer any need for polling between the client and the server.

This enables you to write web based programs in similar fashion to how you wrote WinForm applications. The forms simply presented a view that responded to events or sent messages to another layer. Previously we have not done that in web applications because we had not constant connection. With Web Sockets, the constant connection can be a reality, and in the right circumstance, a great way to write your programs.

HTML5 is the key. If your device, browser or otherwise, does not support HTML5, you will not be able to take advantage of Web Sockets.

If you’d like to get a little more detail on web sockets you can go take a look at Barry Burd’s interview with Frank Greco who has become a champion for web sockets.

Will web sokets become the new standard for how we write web software, or will it be relegated to special needs applications? Share your thoughts here or by email at btaylor@sswug.org.

Cheers,

Ben