SignalR Real-time Application Cookbook


Book and eBook expected April 2014. Pre-order now!
SignalR Real-time Application Cookbook
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$23.99
save 20%!
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 : 345 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 computers since when he was at high school, and he always wanted to work with computers for a living. He has a degree in Electronic Engineering obtained in Italy, and has been working in Information Technology since 1995, doing consulting on many different projects and for several customers. He is a software developer and architect, with strong experience with the Windows platform and in particular with .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 architecting 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 has written technical articles for an Italian magazine in the past, and he now puts his efforts into looking at the latest advances in programming or into contributing to open source projects like ElmahR, a real-time error monitoring web dashboard built on top of SignalR. You can find out more about it here: http://elmahr.apphb.com/.

Since 2011 he has worked in Switzerland where he lives with his wife, Cecilia, and their cats. You can follow him on Twitter: @wasp_twit Roberto's blogs can be found at http://www.robychechi.it/roby

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

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 +    OpenNebula 3 Cloud Computing =
50% Off
the second eBook
Price for both: $45.60

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

What you will learn from this book

  • Build SignalR servers
  • Build SignalR clients with both the JavaScript client and the .NET client
  • Use the Hubs API
  • Use the Persistent Connection API
  • Handle connection lifetime
  • Successfully authorize requests
  • Scale up and scale out your SignalR applications
  • Master how to handle errors
  • Understand the difference between proxy-full and proxy-less approaches
  • 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 bi-directional communication between client and server over HTTP, transparently using a variety of systems to ensure you're always provided with the experience of a persistent connection. This way SignalR enables servers to push information down to the connected clients through a very simple and streamlined API.

SignalR is based on standard web technologies but its usage is not limited to ASP.NET web applications: in fact, it comes with client libraries to perform connections from either JavaScript or different types of .NET applications. SignalR is a great tool which enables you to build modern, interactive and efficient applications based on web technologies.

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 down to complex use cases, going through a comprehensive overview of the library. This book clarifies how SignalR works and how it’s structured, exposing the main concepts by taking you down a path from simple to advanced recipes. Along the way you will learn how to perform a set of common tasks, and at the end of the book you will find a set of ready-made solutions for more complex scenarios.

With this book, you will learn how to create bi-directional connections using the available APIs. You will also learn the differences between them and how to choose the most appropriate API for your requirements. You will also learn how to perform authorization, how to deal with cross-domain scenarios, how to scale up and scale out your applications, and how to hook into the library to extend its behavior.

SignalR Real-time Application Cookbook will teach you everything you need to know to become easily and quickly productive in all the main scenarios covered by this useful library.

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