Your SlideShare is downloading. ×
0
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Introduction to SignalR
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to SignalR

15,688

Published on

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.

Published in: Technology
0 Comments
15 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
15,688
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
15
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

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

×