Declined
Last Updated: 27 Apr 2020 07:36 by ADMIN
Ben Hayat
Created on: 06 Nov 2019 19:56
Category: UI for Blazor
Type: Feature Request
0
Support .Net Core gRPC feature within the component

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

6 comments
ADMIN
Marin Bratanov
Posted on: 27 Apr 2020 07:36

Hi Ben,

To set up gRPC in your project you need, at the minumum:

  • NuGet package references
  • usually a service
  • a gRPC server
  • protobuf file

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Ben Hayat
Posted on: 24 Apr 2020 20:24

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!

Ben Hayat
Posted on: 09 Nov 2019 03:56
Thank you Marin;

As I looked into the gRPC further, I also noticed the dependencies that you spoke of and your comments made perfect sense about how the components at component level should not carry such dependencies.

And secondly, thanks for your effort on the sample. I will look into it.
..Ben
ADMIN
Marin Bratanov
Posted on: 08 Nov 2019 16:40

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

 UI for Blazor
Ben Hayat
Posted on: 07 Nov 2019 16:58

Thank you Marin for your detailed answer. If I go this route, I will certainly share results with the team.

Thanks!

ADMIN
Marin Bratanov
Posted on: 07 Nov 2019 16:52

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

 UI for Blazor