Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
SIGNALR + ASP.NET
MVC
LEVERAGING ON REAL-TIME DATA UPDATES
TOPICS
• Introduction to ASP.NET MVC 6 + ASP.NET 5
• Key Concepts of SignalR
• Quick Look at SignalR
• SignalR with ASP.NE...
ASP.NET MVC 6 + ASP.NET 5
• ASP.NET is now on Mac and Linux
• No More Web Forms
• No More Visual Basic
• Tag Helpers versu...
SIGNALR
Advocating a Real Time Data Communication between UIs
KEY CONCEPTS
•Remote Procedural Calls (RPC)
•WebSocket Wrapper
•Transports & Fallbacks
KEY CONCEPTS: “SERVER PUSHING”
“SignalR supports "server push"
functionality, in which server code can
call out to client ...
KEY CONCEPTS: TRANSPORTS
• HTML5 Transports
• WebSocket – only transport that establishes true two way persistent connecti...
KEY CONCEPTS: TRANSPORTS
$.connection.hub.logging = true;
• Enable Logging in your code
• Opening the Console Window in yo...
KEY CONCEPTS: SPECIFYING A TRANSPORT
If you know the client’s capability…
connection.start({ transport: 'longPolling' });
...
KEY CONCEPTS: SPECIFYING A TRANSPORT
•webSockets
•foreverFrame
•serverSentEvents
•longPolling
KEY CONCEPTS: CONNECTIONS & HUBS
• Persistent Connection
• Low-level communication protocol
• PersistentConnection class
•...
KEY CONCEPTS: HOW HUBS WORK
• Server-side calls a method on the client
• A packet is sent across (name of method + paramet...
KEY CONCEPTS: WHEN TO USE PERSISTENT
CONNECTION?
• The format of the actual message sent needs to be specified.
• The deve...
GETTING STARTED
install-package Microsoft.AspNet.SignalR
DEMO
TELERIK PROFILE
•Since 2002
•Over 1.7 million developers
•Developer-focused
ABIT ABOUT TELERIK
• UI Toolkits – Web Forms, MVC, Silverlight, Kendo UI, WinForms, WPF, UWP
(Windows 10), and many more.
...
CONTACT
• http://theprogrammingnerd.com
• http://github.com/telerikgeek
• Skype: metanoia.sherman
• Instagram: telerikgeek...
QUESTIONS?
Upcoming SlideShare
Loading in …5
×

SignalR with ASP.NET MVC 6

3,457 views

Published on

Deep diving SignalR with ASP.NET MVC 6.
Speaker: Mr Sherman Chen - Telerik Senior Architect/Advocate with more than 15 years developing desktop, web and mobile apps

Published in: Software
  • Be the first to comment

  • Be the first to like this

SignalR with ASP.NET MVC 6

  1. 1. SIGNALR + ASP.NET MVC LEVERAGING ON REAL-TIME DATA UPDATES
  2. 2. TOPICS • Introduction to ASP.NET MVC 6 + ASP.NET 5 • Key Concepts of SignalR • Quick Look at SignalR • SignalR with ASP.NET MVC 6 deep-dive demo • Questions & Answer
  3. 3. ASP.NET MVC 6 + ASP.NET 5 • ASP.NET is now on Mac and Linux • No More Web Forms • No More Visual Basic • Tag Helpers versus MVC Helpers • View Components • Microsoft.AspNet.Mvc.Controller • AngularJS
  4. 4. SIGNALR Advocating a Real Time Data Communication between UIs
  5. 5. KEY CONCEPTS •Remote Procedural Calls (RPC) •WebSocket Wrapper •Transports & Fallbacks
  6. 6. KEY CONCEPTS: “SERVER PUSHING” “SignalR supports "server push" functionality, in which server code can call out to client code in the browser using Remote Procedure Calls (RPC), rather than the request-response model common on the web today. ”
  7. 7. KEY CONCEPTS: TRANSPORTS • HTML5 Transports • WebSocket – only transport that establishes true two way persistent connection • Server Sent Events - EventSource • Comet Transports (makes use of HTTP) • Forever Frame (only IE) • Ajax Long Polling
  8. 8. KEY CONCEPTS: TRANSPORTS $.connection.hub.logging = true; • Enable Logging in your code • Opening the Console Window in your web browser
  9. 9. KEY CONCEPTS: SPECIFYING A TRANSPORT If you know the client’s capability… connection.start({ transport: 'longPolling' }); If not, always make sure there is a fallback… connection.start({ transport: ['webSockets','longPolling'] });
  10. 10. KEY CONCEPTS: SPECIFYING A TRANSPORT •webSockets •foreverFrame •serverSentEvents •longPolling
  11. 11. KEY CONCEPTS: CONNECTIONS & HUBS • Persistent Connection • Low-level communication protocol • PersistentConnection class • Hub • High-level pipeline • Allowing clients to call methods on servers • Similarity to .NET Remoting
  12. 12. KEY CONCEPTS: HOW HUBS WORK • Server-side calls a method on the client • A packet is sent across (name of method + parameters) • If the parameter is an object, it will be serialized as JSON • Client checks to see if the method exists in client-side coding • If exists, the method is executed using the deserialized parameter data.
  13. 13. KEY CONCEPTS: WHEN TO USE PERSISTENT CONNECTION? • The format of the actual message sent needs to be specified. • The developer prefers to work with a messaging and dispatching model rather than a remote invocation model. • An existing application that uses a messaging model is being ported to use SignalR.
  14. 14. GETTING STARTED install-package Microsoft.AspNet.SignalR
  15. 15. DEMO
  16. 16. TELERIK PROFILE •Since 2002 •Over 1.7 million developers •Developer-focused
  17. 17. ABIT ABOUT TELERIK • UI Toolkits – Web Forms, MVC, Silverlight, Kendo UI, WinForms, WPF, UWP (Windows 10), and many more. • Telerik Test Studio – Automated Testing solution (Native Mobile Apps) • Telerik Platform – Cross-platform Mobile App Development & Management • Telerik Sitefinity – Web Content Management System
  18. 18. CONTACT • http://theprogrammingnerd.com • http://github.com/telerikgeek • Skype: metanoia.sherman • Instagram: telerikgeek • Twitter: telerikgeek
  19. 19. QUESTIONS?

×