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

Grpc-web #1

Open
ghost opened this issue Aug 24, 2018 · 2 comments
Open

Grpc-web #1

ghost opened this issue Aug 24, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 24, 2018

This example uses json.

Grpc-web support landed in the repo,so you can use grpc for flutter and grpc-web for angular.

This is pretty easy to standup with a grpc golang server. So far it works flawlessly.

The only missing bit of the puzzle is how well dart angular supports grpc-web.

Maybe others here might know ?

@ghost
Copy link
Author

ghost commented Aug 24, 2018

Looks like it's not just me :)

grpc/grpc-web#213

@brianegan
Copy link
Owner

brianegan commented Aug 25, 2018

Hey there! GRPC would be great -- it's a really cool tech :) That said, I think it's a bit of "out of scope" for this sample, since this relies on the Github API which uses json REST endpoints or GraphQL endpoints.

I haven't seen good support for grpc with AngularDart, but I played with it a couple months ago. Looking at some tickets, it appears it might be in the works though!

Overall, it'd be super easy with this architecture to swap out JSON for GRPC, without any modification in the Angular or Flutter apps. Why? Because all of the logic for coordinating with the github backend is contained inside the data layer. Specifically, the GithubRepository and GithubClient classes.

Therefore, to support GRPC, you could either: change GithubClient to use GRPC instead of http calls, or create a new GithubGrpcClient class and use that in the repository instead of the normal http GithubClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant