• Save
Introduction to SignalR
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Introduction to SignalR

on

  • 16,293 views

A modified version of my Desert Code Camp 2011.2 presentation on SignalR from November 5th, 2011. ...

A modified version of my Desert Code Camp 2011.2 presentation on SignalR from November 5th, 2011.

It's modified since I'm more of a talker and rarely utilize bullet points and much text in my slides.

Statistics

Views

Total Views
16,293
Views on SlideShare
16,101
Embed Views
192

Actions

Likes
14
Downloads
0
Comments
0

7 Embeds 192

http://jabbr.net 122
http://localhost 31
http://chat.systemex.net 15
http://seth-jabbr.apphb.com 10
http://coderwall.com 10
http://192.168.1.105 2
http://www.linkedin.com 2
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Introduction to SignalR Presentation Transcript

  • 1. Adam Mokan @adammokanDesert Code Camp Nov 5th, 2011
  • 2. What is SignalR?• Creates a “persistent connection” between server and client(s) in ASP.NET allowing you to push data from server to client.• Led by David Fowler and Damian Edwards.• Not an official Microsoft project.• OSS project on Github with MIT License.• NuGet packages available.• Simple to setup & just works. Install-Package SignalR
  • 3. Potential use-cases • Chat - Don’t be that developer * • Real-time impact analysis on current users • Pub-sub mechanism for analytics, logging, exception capture • Real-time charting without repeat client-side ajax polling • Collaborative applications allowing multiple users to interact with the same screen • Real-time analytics dashboard showing client details (geo-location based on IP address, browser info, screen resolution, etc) • “Growl-like” notifications for users* No offense towards someone that has the real need to build a chat application from scratch but this reminds me of the “Learn Rails and build a blog” tutorials years ago.
  • 4. Samples
  • 5. SignalR.Server• Two primary approaches to implementing • Persistent Connections (low-level) • Implements an IHttpHandler • Must implement a route to make the endpoint accessible. • public class TestEndpoint : PersistentConnection { // do something } • Hubs (high-level) • Automatically implements route over “<app>/signalr/hubs/” by convention. • public class TestHub : Hub { // do something }
  • 6. SignalR client libraries• SignalR.Js - Javascript SignalR client• SignalR.Client - .NET client for SignalR• SignalR.Client.WP7 - Windows Phone client for SignalR
  • 7. Wait, I thought WebSockets were meant for this?This all works over HTTP?
  • 8. Let’s look at how we interact with the webin a vast majority of scenarios and how some HTTP cleverness allows SignalR to work.
  • 9. The basic Request-Response pattern
  • 10. A simple example of polling via AJAX.
  • 11. http://www.flickr.com/photos/londonmatt/4204313724/What is long-polling?
  • 12. Let’s look at some code.
  • 13. Resources Bitly bundle * - bit.ly/signalr-dcc11SignalR git repo - github.com/SignalR/SignalRSignalR docs - github.com/SignalR/SignalR/wiki * More resources will be added to the bitly bundle in the future
  • 14. Thank you!Please review the presentation with any feedback or criticisms at speakerrate.com/talks/8878