Admin edit: While this cannot become a built-in feature, you may find useful the following example: https://github.com/telerik/blazor-ui/tree/master/common/grpc-example
Hello Team;
As .Net Core 3 offers gRPC support, I'm suggesting that the Blazor Team, look into some of the components that could automatically talk to backend gRPC services to get data, i.e. Auto Complete or DropDown box.
This way it could simplify different ways of providing datasource to some of these data oriented components.
Hope this suggestion helps!
..Ben
Hi Ben,
To set up gRPC in your project you need, at the minumum:
None of those are related to the UI and to our components, and it is not our place to add or document that, or to impose requirements, or even to provide guidelines, as everything is highly specific to each individual project. Thus, my comment that those cannot be exposed as configuration options on a component like ours stems from that - these are not UI options of a component. We don't have built-in data retrieval options, this task is left entirely to the view-model and the application. Our components merely need the Data collection. It is up to the app to decide where and how to get it (REST, gRPC, generation, local storage, something else).
On tooling - yes, that's what I mean.
Using gRPC or not should not affect our components. So long as the requirements listed here and here are met, they will function. Where the data comes from is not relevant to them - for our components the data always comes from the view-model.
Regards,
Marin Bratanov
Progress Telerik
Hi Marin;
I'd like to revisit this discussion as we're getting close to this subject. You wrote
On the other hand, the entire gRPC tooling under C# has a lot of
dependencies that cannot be shown as configuration options on a
component like ours, there are simply far too many moving parts even for
a "simple" gRPC client.
Could you please explain what you mean by the configuration options related to your components, as opposed to if we were using HTTP and calling a REST service.
Does this mean, that your components have certain builtin features based on if we were using REST vs. gRPC?
This confused me.
Next you mentioned:
Thus, if you want to consume gRPC services, you should implement the desired tooling and logic in your application and pass the data you get to our components, as it is shown in our documentation - the data origin is not important to the Telerik components
Could you please clarify what you mean by "Tooling"? Do you mean, we should create our gRPC server, gRPC client side library to communicate with server and create C# collection or object and etc? Like you did with your sample?
I just want to make sure going towards gRPC, will not handicap us to use all your components.
Thank you in advance!
Hi Ben,
I created the following generic example that you may find useful: https://github.com/telerik/blazor-ui/tree/master/common/grpc-example
Regards,
Marin Bratanov
Progress Telerik
Thank you Marin for your detailed answer. If I go this route, I will certainly share results with the team.
Thanks!
Hello Ben,
The Telerik UI for Blazor tools have a parameter that receives the data they work with. It is entirely up to the application to supply that data. This allows for full flexibility for the application developer and the data origin - be that remote WebAPI or OData endpoints, a gRPC service, or a local database, or anything else that you may have.
On the other hand, the entire gRPC tooling under C# has a lot of dependencies that cannot be shown as configuration options on a component like ours, there are simply far too many moving parts even for a "simple" gRPC client.
Thus, if you want to consume gRPC services, you should implement the desired tooling and logic in your application and pass the data you get to our components, as it is shown in our documentation - the data origin is not important to the Telerik components.
If you do decide to create an example of a Blazor application consuming a gRPC service, I would encourage you to open a pull request here: https://github.com/telerik/blazor-ui and we will gladly award your contribution with Telerik points. In implementing such code, you may find the following MSDN articles and tutorials useful:
Regards,
Marin Bratanov
Progress Telerik