Introduction
Now, it's time to move our attention to the client side of SignalR. We've already written the client-side code in the previous chapters and briefly described the steps we needed to build fully working recipes; however, we never went into the details. Nevertheless, the client portion of any SignalR application is as necessary and important as the server counterpart. Here, we'll explore how a SignalR client really works and concentrate on the specific characteristics of the JavaScript client library in the context of its Hubs API.
The level of abstraction used by the Hubs API lets us reason in terms of the business methods defined on our server-side Hub-derived type. As already explained earlier, we can add as many methods on a Hub as we need, and define with these an interface made up of members with names and arguments which fit our business requirements.
The JavaScript client can access this interface in two different modes as follows:
A basic mode, where methods and events are...