jsakamoto / Toolbelt.Blazor.LoadingBar

Loading bar UI for Client-Side Blazor application.
Mozilla Public License 2.0
174 stars 18 forks source link

How can i implement this in server side blazor? #3

Open saifurrehmanx opened 5 years ago

franciscohumarang commented 5 years ago

Hi,

Any update on this for server side implementation?

Tried adding this on a server side project but it cant find

 services.AddLoadingBar();

   app.UseLoadingBar();
jsakamoto commented 5 years ago

Humm...

What does mean to "server-side loading bar"?

The loading bar indicate during fetching data from client-side to server-side.

However, server-side Blazor apps doesn't happen fetching data from client-side to server-side, never.

In the server-side Blazor app scenario, there is no business logic in client-side, All of the work is in server-side.
Client-side is responsible only accepting inputs and rendering view, via SignalR connection with server-side.

Could you tell me more detail of the scenario that you want to use loading bar on server-side Blazor?

franciscohumarang commented 5 years ago

What I'm saying is a loading bar at the top should also works on Server Side Blazor when fetching data rather than showing "Loading..." text. ALso when redirecting redirecting pages, say a login, which usually takes time due to database calls on the server, a loading bar will help to inform user that a processing is on going.

Currently it only works in client side type blazor app (Web Assembly) but doesnt work on Server Side Type Blazor. For example, app. app.UseLoadingBar(); does not work if you add it on Server-Side Blazor App because the app parameter in Server Side Blazor is IApplicationBuilder app, whereas in CLlent-Side Blazor (WebAssembly), its Configure(IComponentsApplicationBuilder app)

So I guess we need a version for Server Side Blazor as well.

Thanks

On Tue, 27 Aug 2019 at 7:24 AM, jsakamoto notifications@github.com wrote:

Humm...

What does mean to "server-side loading bar"?

The loading bar indicate during fetching data from client-side to server-side.

However, server-side Blazor apps doesn't happen fetching data from client-side to server-side, never.

In the server-side Blazor app scenario, there is no business logic in client-side, All of the work is in server-side. Client-side is responsible only accepting inputs and rendering view, via SignalR connection with server-side.

Could you tell me more detail of the scenario that you want to use loading bar on server-side Blazor?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jsakamoto/Toolbelt.Blazor.LoadingBar/issues/3?email_source=notifications&email_token=AARWASTERPF2Q2NAH6FDE43QGRQ25A5CNFSM4H53NLG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5F7HEQ#issuecomment-525071250, or mute the thread https://github.com/notifications/unsubscribe-auth/AARWASROGHNQUUH5KKFSK3TQGRQ25ANCNFSM4H53NLGQ .

ryanbuening commented 3 years ago

Blazor server-side apps can also use HttpClient to contact various services, so I would think this library would be of use there as well.