-Wappler and signalR?

Hello Wappler Community :blush:

I want a real-time web UI to visualize some of the data I have on server-side (asp.net), with SignalR *

Can I just pass stuff I got from SignalR directly into wappler (especially with app connect framework components) to have it show up ?

Or does I need some type of wrapper/proxy around the data (which meant I have to run through some mapping exercise to have models working) ?

I checked this thread (How to access variables from JavaScript) but as I’m not sure to fully understand :sweat_smile:, so…

Best regards :blush:

1 Like

Welcome Ermo!

Great to hear you are exploring some very interesting possibilities for real time data pushing!

Wappler and it’s client side framework App Connect can definitely help you visualize this data easy.

App Connect work with all kinds of JSON data sources so if your data is available in JSON you can easy connect with it with the API Data Source component.

It is currently “pull” only with possible auto refresh with the Action Scheduler component.

We might also add websockets in the future if more people require it.

Maybe you can explain your case more in detail, so we can advise you with the best approach in Wappler.

So what kind of data you have, where is it coming from, how often does it refresh and how would you like to visualize it?

1 Like

Thanks you for your answer George :blush:

App Connect work with all kinds of JSON data sources so if your data is available in JSON you can easy connect with it with the API Data Source component.

Ok I read your thread : New API Data Source - workflow
Data/parameter I’m passing from server to client or vice versa is automatically converted to JSON with SignalR yes :slight_smile:
However, except for previewing with a test json exported, I’m not sure, for live production, I could access it with a url.
I must reference signalR and jquery library in javascript code and create a function in js that signaR Hub can call, like in this tutorial :
https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr

It is currently “pull” only with possible auto refresh with the Action Scheduler component.

Ok.So, if I add the needed js files to wappler, reference them in wappler’s code, can I pass value from signalR directly to Action Scheduler component ? Or does I need another thing ?

We might also add websockets in the future if more people require it.

This will be cool :slight_smile:
If I understand correctly, as SignalR is a websocket framework, a facilitating implementation of websockets in asp.net with js, I think I will stay with it.

Maybe you can explain your case more in detail, so we can advise you with the best approach in Wappler.So what kind of data you have, where is it coming from, how often does it refresh and how would you like to visualize it?

For moment, I’m just beggining (and I’m a beginner in this area…).:sweat_smile:
I have very basic knowledge of C# and asp.net (just few examples with tutorials) but what I would implement is to pass value of powershell output in backend to the view side, a spa.
As there could be a delay with powershell output, and the app must have rich interaction with it, signalR is the ideal solution with simple asp.net, not mvc.

I don’t plan to use asp.net mvc, because it seems not ideal for a spa :

  • razor will be more and more outdated (I’m stuck in backend with .net classic framework, not core).

  • The idea is to have a very reactive app, so only the needed data will be sent between server and client.

  • the idea to have to change only view part at js client side, as browsers evolve very fast, seems very interesting too :yum: Integrating asp.net mvc with frameworks or other tech for view part seems far to be bugfree, to what I see on web.

    Best regards :blush:

From what I see, you don’t need asp.net at all indeed. Wappler’s own front-end framework App Connect provides you with all the reactive data bindings you need to build the perfect SPA

You can just use asp.net for the data retrieval, but it can be done by our own server side framework Server Connect that does all that for you in any server language you have.

Maybe to make the results of your shell script more accessible just store them in a database and do a regular poll to the database for new data.

When app connect gets a new data all the UI is auto updated with it just as with any reactive app

1 Like

Ok, I will evaluate this solution, many thanks for your answer, George :blush:

Hi @George,
Any luck with supporting Web Sockets in wappler? Can we expect this soon? I’m working on a crypto product and I want my page to receives price changes pushed by the exchange web sockets and immediate display the new data instantly.

What’s the workaround to achieve this until web sockets are supported out of the box in Wappler? Any help would be greatly appreciated!