Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data loading without needing a server API endpoint #46400

Open
mkArtakMSFT opened this issue Feb 1, 2023 · 5 comments
Open

Data loading without needing a server API endpoint #46400

mkArtakMSFT opened this issue Feb 1, 2023 · 5 comments
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-full-stack-web-ui Full stack web UI with Blazor Pillar: Complete Blazor Web
Milestone

Comments

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Feb 1, 2023

With .NET running on both ends of the wire in a Blazor app, we have the opportunity to dramatically simplify data access with a strongly typed programming model. This issue tracks exploring adding a streamlined programming model for loading and manipulating data from the client.

@jeffreypalermo
Copy link

I am very interested in this. I have created a pattern that lets me do this constrained by the current APIs. I made a video about it here. https://www.youtube.com/watch?v=PsmXZnvWfIo

@Ali1Jamal
Copy link

Ali1Jamal commented Dec 8, 2023

yes the hole idea of blazor server is we can code the backend and frontend in one single project without need to create backend with webapi and then make request from blazor server to webapi , blazor server is solved that problem . but in .net 8 we have the auto render mode which is not actually make benefit for me because this mode require to use webapi .
so i'm stick with blazor interactive server,
but we can make blazor more more powerful, if we can have one blazor project that we can code backend and we can use Auto render mode with it,
To achieve this there is a suggestion in my mind:
1- every method in . razor will be shared for wasm (client), and interactive server mode.
2-if any method have [ServerOnly] attribute in . razor it will be in server only and to get access to this method from wasm(client) we need generate this method as endpoint and get access to it (this can achieve by webapi or signalr) if you guys choose signalR then make the signalR if its lost the cirecit then create new one automatically without need to refresh the website (because its for endpoints only and will not effect the state of blazor).
I hope something similar to this will be done in
.net 9.

@mkArtakMSFT mkArtakMSFT modified the milestones: Planning: WebUI, Backlog Jan 3, 2024
@ghost
Copy link

ghost commented Jan 3, 2024

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@AndrewBabbitt97
Copy link

@mkArtakMSFT This doesn't seem to have been touched in a while, is there any plans to look at this for the .NET 10 cycle? This feels like the last step to making Blazor Web Apps really nice from a DX perspective. Data access feels cumbersome to implement when using multiple render modes.

@mguinness
Copy link

A question In the new Blazor Web App template using .net 8, how do I make an HTTP request from a InteractiveWebAssembly mode component? discusses the options, so it would be good to have some guidance from MSFT other than Service abstractions for web API calls. Are any changes planned for the Blazor Web App template to showcase the best practice?

@bpawluk Not sure if you're aware of this issue and have any comments to add based on your work with BlazorUtils.EasyApi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-full-stack-web-ui Full stack web UI with Blazor Pillar: Complete Blazor Web
Projects
None yet
Development

No branches or pull requests

7 participants