title: Declaring a reference to hub proxy in SignalR
body: <p>I am wondering...</p>
  
  <p>The following code declares a reference to a hub proxy.</p>
  
  <pre><code>var chat = $.connection.chatHub;
  </code></pre>
  
  <p>And the following code also:</p>
  
  <pre><code>var connection=$.hubConnection();
  var hub=connection.createHubProxy("chatHub");
  </code></pre>
  
  <ol>
  <li>So what is the difference between the two tpyes of declaration?  </li>
  <li>Which one to be used and when?</li>
  </ol>