SignalR Real-time Application Cookbook

Use SignalR to create real-time, bidirectional, and asynchronous applications based on standard web technologies.
Preview in Mapt

SignalR Real-time Application Cookbook

Roberto Vespa

1 customer reviews
Use SignalR to create real-time, bidirectional, and asynchronous applications based on standard web technologies.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$21.00
RRP $29.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$21.00
$49.99
$29.99p/m after trial
RRP $29.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


SignalR Real-time Application Cookbook Book Cover
SignalR Real-time Application Cookbook
$ 29.99
$ 21.00
SignalR: Real-time Application Development Book Cover
SignalR: Real-time Application Development
$ 14.99
$ 10.50
Buy 2 for $28.00
Save $16.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781783285952
Paperback292 pages

Book Description

SignalR is a recent addition to ASP.NET, which allows you to add real-time functionalities to your applications. SignalR enables bidirectional communication between client and server over HTTP, transparently, and ensures you're always provided with the experience of a persistent connection.

SignalR Real-time Application Cookbook is a practical, hands-on guide that provides a number of clear step-by-step recipes that will gradually enable you to add SignalR as an innovative, effective, and useful item in your toolbox. This book will move from simple examples on to complex use cases, going through a comprehensive overview of the library. Other than helping out with the common tasks, at the end of the book you will find a set of ready-made solutions for more complex scenarios.

Table of Contents

Chapter 1: Understanding the Basics
Introduction
Adding a Hub to an ASP.NET project
Adding a Hub to a self-hosting application
Connecting to a Hub from a JavaScript client
Connecting to a Hub from a .NET application
Chapter 2: Using Hubs
Introduction
Adding a method to a Hub and counting the calls to it
Calling back the caller from a Hub's method
Broadcasting to all connected clients
Adding a connection to a group
Removing a connection from a group
Broadcasting to all connected clients except the caller
Broadcasting to all clients except the specified ones
Broadcasting to all clients in a group except the caller
Broadcasting from outside a Hub
Using the return value of a Hub method
Chapter 3: Using the JavaScript Hubs Client API
Introduction
Starting a Hub connection
Setting up connection transport strategies
Calling a server-side Hub method
Adding a client-side method on the proxy and calling it from the server
Managing errors across a complex asynchronous workflow
Chapter 4: Using the .NET Hubs Client API
Introduction
Starting a Hub connection
Setting up connection transport strategies
Calling a server-side Hub method
Adding a client-side method on the proxy and calling it from the server
Managing errors across a complex asynchronous workflow
Chapter 5: Using a Persistent Connection
Introduction
Adding and registering a persistent connection
Sending messages from the server
Sending messages to the server
Exchanging messages between a server and a JavaScript client
Exchanging messages between a server and a .NET client
Chapter 6: Handling Connections
Introduction
Controlling the lifetime of a connection
Handling a connection transient state
Establishing a cross-domain connection
Chapter 7: Analyzing Advanced Scenarios
Introduction
Generating static files for JavaScript proxies
Authorizing requests on a Hub
Authorizing requests on a persistent connection
Authorizing requests in a self-hosting context
Scaling up
Scaling out with Azure
Scaling out with Redis
Scaling out with SQL Server
Establishing proxy-less connections
Introducing dependency injection (simple approach)
Introducing dependency injection (advanced approach)
Using dependency injection to replace a default behavior
Extending the Hub pipeline
Handling errors
Chapter 8: Building Complex Applications
Introduction
Implementing a room-based chat application
Implementing a shared whiteboard
Implementing a real-time map of flying airplanes
Implementing a "pets finder" application
Implementing a custom backplane
Implementing a real-time error notification system

What You Will Learn

  • Teach you how to build SignalR servers
  • Illustrate SignalR clients built with both the JavaScript and the .NET client libraries
  • Demonstrate both the Hubs API and the Persistent Connection API
  • Demystify the lifetime of a connection
  • Explain how to authorize requests
  • Scale up and scale out your SignalR applications
  • Enable you to handle errors efficiently
  • Extend SignalR with custom services
  • Solve complex real-time scenarios with the help of advanced, ready-made examples

Authors

Table of Contents

Chapter 1: Understanding the Basics
Introduction
Adding a Hub to an ASP.NET project
Adding a Hub to a self-hosting application
Connecting to a Hub from a JavaScript client
Connecting to a Hub from a .NET application
Chapter 2: Using Hubs
Introduction
Adding a method to a Hub and counting the calls to it
Calling back the caller from a Hub's method
Broadcasting to all connected clients
Adding a connection to a group
Removing a connection from a group
Broadcasting to all connected clients except the caller
Broadcasting to all clients except the specified ones
Broadcasting to all clients in a group except the caller
Broadcasting from outside a Hub
Using the return value of a Hub method
Chapter 3: Using the JavaScript Hubs Client API
Introduction
Starting a Hub connection
Setting up connection transport strategies
Calling a server-side Hub method
Adding a client-side method on the proxy and calling it from the server
Managing errors across a complex asynchronous workflow
Chapter 4: Using the .NET Hubs Client API
Introduction
Starting a Hub connection
Setting up connection transport strategies
Calling a server-side Hub method
Adding a client-side method on the proxy and calling it from the server
Managing errors across a complex asynchronous workflow
Chapter 5: Using a Persistent Connection
Introduction
Adding and registering a persistent connection
Sending messages from the server
Sending messages to the server
Exchanging messages between a server and a JavaScript client
Exchanging messages between a server and a .NET client
Chapter 6: Handling Connections
Introduction
Controlling the lifetime of a connection
Handling a connection transient state
Establishing a cross-domain connection
Chapter 7: Analyzing Advanced Scenarios
Introduction
Generating static files for JavaScript proxies
Authorizing requests on a Hub
Authorizing requests on a persistent connection
Authorizing requests in a self-hosting context
Scaling up
Scaling out with Azure
Scaling out with Redis
Scaling out with SQL Server
Establishing proxy-less connections
Introducing dependency injection (simple approach)
Introducing dependency injection (advanced approach)
Using dependency injection to replace a default behavior
Extending the Hub pipeline
Handling errors
Chapter 8: Building Complex Applications
Introduction
Implementing a room-based chat application
Implementing a shared whiteboard
Implementing a real-time map of flying airplanes
Implementing a "pets finder" application
Implementing a custom backplane
Implementing a real-time error notification system

Book Details

ISBN 139781783285952
Paperback292 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
ASP.NET Web API: Build RESTful web applications and services on the .NET framework Book Cover
ASP.NET Web API: Build RESTful web applications and services on the .NET framework
$ 29.99
$ 21.00
Multithreading in C# 5.0 Cookbook Book Cover
Multithreading in C# 5.0 Cookbook
$ 29.99
$ 21.00
Bootstrap for ASP.NET MVC Book Cover
Bootstrap for ASP.NET MVC
$ 19.99
$ 14.00
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
Bootstrap Site Blueprints Book Cover
Bootstrap Site Blueprints
$ 26.99
$ 18.90