locked
blazor vs signalr RRS feed

  • Question

  • User2110873642 posted

    Why would one use SignalR on a blazor project that already utilises signalr in the background? what are the benifits of using it a second time on top of blazer? why is it a topic by users? because to me it seems like a connection is obviously already there.

    Sunday, July 19, 2020 7:02 PM

All replies

  • User475983607 posted

    Why would one use SignalR on a blazor project that already utilises signalr in the background? what are the benifits of using it a second time on top of blazer? why is it a topic by users? because to me it seems like a connection is obviously already there.

    It seems you are a bit confused about the technology.  Server Blazor uses SignalR.  Blazor Web Assembly does not.  

    Add SingalR to Blazor WASM when you want an application that responds to server side events in real-time.

    Sunday, July 19, 2020 7:21 PM
  • User2110873642 posted

    you read it wrong, i am not confused about that. i know that server side blazor uses signalR, i said it in the question.

    i want to know why some people implement signalR a second time on blazor.

    -----------

    new question:

    is it true that Blazor's implementation responds to client side events, and that when a developer ads signalR a 2nd time, that it can respond to server side events?

    with client side, i use a loop to update. with a 2nd SignalR implementation i would not need that?

    Sunday, July 19, 2020 11:03 PM
  • User302204515 posted

    That's correct, a client side signalR is the way how developer can get rid of the loop request to server to get latest status, we have javescript signalR, TypedScript signalR, Blazor signalR. A server side signalR need co-work with client side signalR. You can image server signalR is push message to client and client signalR is pull message from server signalR.

    for more detail, you can refer to this document

    https://docs.microsoft.com/en-us/aspnet/core/tutorials/signalr-blazor-webassembly?view=aspnetcore-5.0&tabs=visual-studio

    Friday, August 14, 2020 3:13 AM