Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@aspnet/signalr vs @microsoft/signalr javascript libraries

Tags:

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

like image 517
diegosasw Avatar asked Nov 05 '19 12:11

diegosasw


People also ask

Which package is used for SignalR?

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.

What is SignalR JavaScript?

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 library?

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.

When should I use SignalR?

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.


1 Answers

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:

  • 3.1.0-preview2.19528.8 - 4 days ago
  • 3.1.0-preview1.19508.20 - 21 days ago
  • 3.0.0 - a month ago
  • 3.0.0-rc1.19457.4 - 2 months ago
  • 3.0.0-preview9.19424.4 - 2 months ago
  • 3.0.0-preview8.19405.7 - 3 months ago
  • 3.0.0-preview7.19365.7 - 3 months ago

And here are the ones for @aspnet/signalr:

  • 3.0.0-preview6.19307.2 - 5 months ago
  • 3.0.0-preview5-19227-01 - 6 months ago
  • 3.0.0-preview4-19216-03 - 7 months ago

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.

like image 144
Etheryte Avatar answered Oct 07 '22 09:10

Etheryte