What's the difference between @aspnet/signalr vs @microsoft/signalr javascript libraries?
Both seem valid for DotNetCore SignalR, both seem active. In some tutorials I find @aspnet/signalr and in DotNet docs they use @microsoft/signalr.
It seems a bit strange that there are 2 different official Microsoft libraries but couldn't find any explanation on what's different
SignalR. Client NuGet package contains the . NET client libraries for ASP.NET Core SignalR. Use the HubConnectionBuilder to create and build an instance of a connection to a hub.
Open-sourced SignalR creates a persistent connection between a client and server. It uses websockets first, then longpolling and other technologies when websockets are unavailable. Once the client and server have created a connection, SignalR can be used to "broadcast" messages to the client.
What is SignalR? ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly. Good candidates for SignalR: Apps that require high frequency updates from the server.
SignalR can be used to add any sort of "real-time" web functionality to your ASP.NET application. While chat is often used as an example, you can do a whole lot more. Any time a user refreshes a web page to see new data, or the page implements long polling to retrieve new data, it is a candidate for using SignalR.
The package was simply moved over from @aspnet
into the more broadly known @microsoft
.
From now on, the correct package is @microsoft/signalr
.
Looking at the version history for the two packages sheds light on the situation. Here are the latest releases for @microsoft/signalr
:
And here are the ones for @aspnet/signalr
:
The move is further confirmed by the fact that the header for the @aspnet/signalr
Github repository reads:
[Archived] Incredibly simple real-time web for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Which is the repository backing the @microsoft/signalr
package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With