SignalR Dublin ALT.NET


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Ex: check order stats of an eCommerce appOn page customer supportGet latest tweets from your account?
  • Windows 8 or Windows Server 2012
  • Explain transport layers
  • Browse the code , dependencies, how solution is configured
  • Explain demo code
  • Explain transport negotiation processEx. Defined transport selection fallback -> connection.start({ transport: ['webSockets','longPolling'] }); Try use fiddler
  • SignalR Dublin ALT.NET

    1. 1. @dublinaltnet Ireland LinkedIn Group Google Group - dublinaltnet Sponsored by
    2. 2. What is SignalR? • It’s a library for adding real-time functionality to an application • It’s open source, written by Microsoft Open technologies • Free to use under Apache 2.0. License
    3. 3. When to use SignalR • Do you have an app that requires a page to refresh in order to get new data ? o Refresh data using Ajax or just a page reload • Need to notify client(s) about new event(s) ? • Need duplex communication? o Ex: Real time document editing o Chat o Game
    4. 4. What OS is supported? • Server o Microsoft Windows • Windows 7,8 • Windows Server 2008 R2, 2012 • Windows Azure o Linux with Mono • Clients o WPF o WinRT o Windows Phone o Silverlight o JavaScript Client o iOS (community supported)
    5. 5. Things to know before deploying • .Net Framework 4.0 & 4.5 • IIS 7.x or 8 o IIS Express is also supported • WebSockets are supported only by IIS 8 (including IIS8 Express)
    6. 6. Browser support • Internet Explorer o WebSockets (10+) o ForeverFrame (8+) o Long polling (8+) • Firefox, Chrome, Safari o WebSockets o Server-Sent Events o Long polling
    7. 7. How does it work?
    8. 8. Hubs API • High level API that allows to make remote procedure calls from a server to connected clients. • Easy to use
    9. 9. {demo} • {Change shape demo}
    10. 10. Configuration explained • To start using HubsApi (Web Client): o Define a root that client will used to connect to our Hub class. Use Route.Table.MapHubs() in your Application_Start method o Default route is “/signalr” o Route can be customized by assigning a new value to route URL: • Server side configuration: o RouteTable.Routes.MapHubs("/signalr", new HubConfiguration()) • JavaScript configuration: o .connection.hub.url = "/signalr” • Create a Hub class – a class that will allow us to call client methods. o Hub class must inherit form Microsoft.Aspnet.Signalr.Hub
    11. 11. Transport selection 1. WebSocket o If IE 8 or earlier then skip step 2 & 3 o If Cross-domain request, check if client & server supports WebSocket else use 4. 2. ServerSent Event 3. Forever Frame 4. Long Polling 5. SignalR supports custom transport selection o Developers can specify the transport selection order connection.start({ transport: ['webSockets','longPolling'] });
    12. 12. Things to remember • There is no compile time validation • Cross-Domain connection is not configured by default • do not use
    13. 13. Q & A • @DorinManoli