Introduction - Pro ASP.NET SignalR: Real-Time Communication in .NET with SignalR 2.1 (2014)

Pro ASP.NET SignalR: Real-Time Communication in .NET with SignalR 2.1 (2014)


When we were contacted by Apress about writing a new book on ASP.NET that targets newer technologies, the first two technologies that came to mind were ASP.NET SignalR and ASP.NET Single Page Applications. We finally decided on ASP.NET SignalR because we believe that it is a great addition to the Microsoft stack of technologies and has a great future. At the same time, we noticed the lack of a good single resource for experienced ASP.NET developers to get started on using this technology, which made it even more important to write this book.

Pro ASP.NET SignalR is the outcome of the work we did in the past few months in collaboration with Apress, our editors, and others who helped us with this process. Our hope is that we have written a good resource for you and that it gives you everything you need to get started with Microsoft ASP.NET SignalR and apply it in practice.

Like any other book or training resource, this book comes with some conventions and assumptions that we had to make to adjust our content for the audience and make it most useful to those who will read it. This introduction section clarifies some of these assumptions and conventions.

Who This Book Is For

As you pick up this book, the first question is whether this is the right book for you. To answer that question, you should know what this book is about. The short answer is that this book is about Microsoft ASP.NET SignalR and serves as a unique resource to get you started with this technology to use it in practice. To achieve that goal, it assumes that you have prior knowledge in some related technologies (shown in the following section).

This book targets intermediate- or professional-level readers who are familiar with the Microsoft stack of technologies for web development as well as basic HTML and JavaScript. With such a background, we teach you how to use Microsoft ASP.NET SignalR with a pragmatic approach. We start with the basic concepts and then move on to more advanced ones, and use practical examples with explanations to make everything easier to understand.

If you want to get started with SignalR and you have the necessary background, this book is for you. If you already know about SignalR and want to advance your knowledge, this book is also for you because more than half of the book is dedicated to advanced topics that most people are not familiar with.

On the other hand, if you are not an experienced .NET developer—especially with ASP.NET, C#, HTML, and JavaScript/jQuery—you might want to start with this book before reading some background information.

Our writing experience tells us that being brief and to the point is important, especially for technical readers who have very limited time and need to keep up with several new technologies. Therefore, this book tries to be brief and cover only what you need. We avoid verbose discussions on background topics and rely on our common agreement for a basic understanding of important background information.


There are two types of prerequisites you should have before reading this book: technical and tool prerequisites.

For technical prerequisites, you have to be familiar with the following technologies and concepts at a beginning to average level:

· ASP.NET (especially its fundamentals)

· Internet Information Services (IIS)

· JavaScript and jQuery library

· HTML and CSS

· Visual Studio (performing common tasks and operations in Visual Studio is basic)

· Windows Azure (having a background can help with certain chapters)

· iOS and Android programming (having a background can help with certain chapters, even though it is not essential)

For tool prerequisites, you need the following installed on your machine:

· Windows operating system (we recommend Windows 8.1, but certain versions of Windows work as long as they can support Visual Studio 2013)

· Visual Studio 2013 (we use this version, but you can use other versions if they support the features you need)

· Fiddler (a free HTTP debugging tool by Telerik used for diagnosis and tracing of applications)

· Google Chrome, Internet Explorer, or Firefox (one or more of these browsers are needed for testing the code samples)

How This Book Is Structured

Our recommendation is to read all the chapters of this book in order. We tried to keep the book short so this can be achieved in a reasonable amount of time. If you want to skip certain topics, however, the chapters are independent from each other, so you can start reading individual chapters if you have enough understanding of the topics covered.

The first two chapters of the book are introductory to get you started. The next two chapters target the most fundamental concepts needed to implement ASP.NET SignalR applications. The four chapters that come next primarily focus on a major topic about ASP.NET SignalR development. The last two chapters are two case studies to show all the concepts in two examples.

Here is a short overview of the chapters in this book:

· Chapter 1: A quick introduction to real-time web development, some general concepts, and ASP.NET SignalR’s history

· Chapter 2: Getting started with ASP.NET SignalR development with some quick examples to demonstrate core concepts

· Chapter 3: Developing SignalR applications with hubs, and related concepts

· Chapter 4: Developing SignalR applications with persistent connections, and related concepts

· Chapter 5: Troubleshooting, debugging, and testing ASP.NET SignalR applications

· Chapter 6: Overview of major clients that support ASP.NET SignalR such as iOS, Android, Windows Desktop, Windows Phone, and others

· Chapter 7: Extending and customizing ASP.NET SignalR’s behavior

· Chapter 8: Configuration, security, and scaling aspects of ASP.NET SignalR

· Chapter 9: Case study

· Chapter 10: Second case study