SignalR Real-time Application Cookbook


SignalR Real-time Application Cookbook
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Build high performance real-time web applications
  • Broadcast messages from the server to many clients simultaneously
  • Implement complex and reactive architectures

Book Details

Language : English
Paperback : 292 pages [ 235mm x 191mm ]
Release Date : April 2014
ISBN : 1783285958
ISBN 13 : 9781783285952
Author(s) : Roberto Vespa
Topics and Technologies : All Books, Web Development, Cookbooks, Open Source


Table of Contents

Preface
Chapter 1: Understanding the Basics
Chapter 2: Using Hubs
Chapter 3: Using the JavaScript Hubs Client API
Chapter 4: Using the .NET Hubs Client API
Chapter 5: Using a Persistent Connection
Chapter 6: Handling Connections
Chapter 7: Analyzing Advanced Scenarios
Chapter 8: Building Complex Applications
Appendix A: Creating Web Projects
Appendix B: Insights
Index
  • 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
  • Appendix A: Creating Web Projects
    • Introduction
    • Creating an empty ASP.NET web application
    • Creating an ASP.NET web forms application
    • Creating an ASP.NET MVC application
    • Creating an MVC controller and a related view
    • Creating an ASP.NET website

Roberto Vespa

Roberto Vespa has been passionate about programming computers since he was at high school, and he always wanted to do that for a living.

He has a degree in Electronic Engineering obtained in Italy, and has been working in the Information Technology industry since 1995, consulting on many different projects and for several customers. He is a software developer and architect with strong experience on the Windows platform, and in particular on the .NET Framework since Version 1.0, and on web technologies. He has always been working across a broad spectrum of responsibilities from distributed applications to complex user interfaces, from architecture and designing solutions to debugging server and client code, and from native Windows clients to web user interfaces.

He loves to learn, share, and communicate about technology. He wrote technical articles for an Italian magazine in the past, and now puts his effort into looking at the latest advances in programming or in contributing to open source projects such as ElmahR, a real-time error monitoring web dashboard built on top of SignalR. You can find out more about it at http://elmahr.apphb.com/.

Since 2011, he has been working in Switzerland where he lives with his wife, Cecilia, and their cats.

You can follow him on Twitter at @wasp_twit.

Roberto's blogs are at http://www.robychechi.it/roby.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

SignalR Real-time Application Cookbook +    Getting Started with Windows VDI =
50% Off
the second eBook
Price for both: $43.05

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • 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

In Detail

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.

Approach

This book contains illustrated code examples to help you create real-time, asynchronous, and bi-directional client-server applications. Each recipe will concentrate on one specific aspect of application development with SignalR showing you how that aspect can be used proficiently.

Who this book is for

Different levels of developers will find this book useful. Beginners will be able to learn all the fundamental concepts of SignalR, quickly becoming productive in a difficult arena. Experienced programmers will find in this book a handy and useful collection of ready-made solutions to common use cases, which they will be able to enhance as needed. Developers can also use the book as a quick reference to the most important SignalR features. No previous practical experience either with SignalR or with real-time communication in general is required.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software