RouteTable.Routes.MapHubs(new HubConfiguration())
is simply the old way of mapping SignalR, and is, as far as I know, deprecated. Stick to app.MapSignalR();
in your Startup class.
As for your other question, you do the first thing in javascript if you'd like a generated proxy, and the other if you don't. More information: http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-javascript-client#genproxy