Top Banner

Click here to load reader

of 51

Dart flightschool cloudendpoint with dart

May 22, 2015

ReportDownload

Documents

-

  • 1. Google Cloud Endpoints with Dartlang

2. @soundTricker318 http://goo.gl/ZpUOs 3. 4. http://www.bfts.co.jp 5. 6. https://www.flickr.com/photos/centralasian/ (CC) 7. altjs 8. GWT GWT Bootstrap CoffeeScript 9. JavaJS Javascript Java 10. Google Cloud Endpoints with Dartlang 11. Google Cloud Endpoints 12. ?Google Cloud EndpointsWhat?https://developers.google.com/appengine/docs/java/endpoints/ 13. ?Google Cloud EndpointsWhat?AppEngine API https://developers.google.com/appengine/docs/java/endpoints/ 14. ?Google Cloud EndpointsWhat?API https://developers.google.com/appengine/docs/java/endpoints/ 15. ?Google Cloud EndpointsPython Python Cloud Endpoints LT 16. ?Google Cloud EndpointsJava JAX-RS http://www.flickr.com/photos/andypiper/ 17. ?Google Cloud EndpointsGoGoogle () http://www.flickr.com/photos/andybons/ 18. ?Google Cloud EndpointsAndroid Cloud Endpoints ( `)https://www.flickr.com/photos/etnyk/ 19. ?Google Cloud EndpointsiPhone ( `)https://www.flickr.com/photos/reticulating/ 20. ?Google Cloud EndpointsNo ImageJavaScript Google API client for JavaScript 21. ?Google Cloud EndpointsDart ( `) Google 22. TGoogle Cloud Endpoints 23. TGoogle Cloud Endpoints 24. TGoogle Cloud EndpointsThird partyThird party 25. TGoogle Cloud Endpoints Appengine Go SDK MacbrewOK$ brew install go-app-engine-64 26. Google Cloud EndpointsT go-endpoints$ go get github.com/crhym3/goendpoints/endpoints 27. TGoogle Cloud Endpoints(struct) go-endpoints JSONStruct 28. TGoogle Cloud Endpoints(struct) 29. TGoogle Cloud Endpoints() go-endpointsstruct 30. TGoogle Cloud Endpoints() 31. TGoogle Cloud Endpoints go-endponts 32. TGoogle Cloud Endpoints 33. TGoogle Cloud Endpointsapp.yaml go-endponts application: my-app-id version: v1 threadsafe: true runtime: go api_version: go1handlers: - url: /.* script: _go_app # - url: /_ah/spi/.* script: _go_app 34. TGoogle Cloud Endpoints appengine go SDK$ goapp serve 35. TGoogle Cloud Endpoints http://localhost:8080/_ah/api/explor er 36. TGoogle Cloud Endpoints 37. TGoogle Cloud Endpoints goapp deploy$ goapp deploy 38. TGoogle Cloud EndpointsGenerator GeneratorGithub $ git clone https://github.com/dartgde/discovery_api_dart_client_generator $ cd discovery_api_dart_client_generator $ pub install 39. TGoogle Cloud Endpoints generate.dart dart_{API} $ URL=https://hogehoge.appstop.com/_ah/api/discove ry/v1/apis/greeting/v1/rest $ curl -s -o greetings.rpc.discovery $URL $ bin/generate.dart I greetings.rpc.discovery o ../ -no-prefix 40. TGoogle Cloud Endpoints pubspec.yaml name: GreetingApp description: A sample web application dependencies: browser: any greeting_v1_api : path : /path/to/dart_greeting_v1_api_client 41. TGoogle Cloud EndpointsImport {API}_browser.dart {API}_client.dartimportimport 'package:greeting_v1_api/greeting_v1_api_browser.dart' as greetingLib; import 'package:greeting_v1_api/greeting_v1_api_client.dart' as greetingClient; 42. TGoogle Cloud Endpoints {API}_client{API} greetingLib.Greeting greeting = new greetingLib.Greeting(); greeting.greets.list().then( (greetingClient.GreetingsList value)=> print(value) ); 43. TGoogle Cloud Endpoints 44. TGoogle Cloud Endpoints? Chrome Extension/App Chrome Appcordova Android/iPhone ? ? 45. Appendix GWTTER Dart 46. http://goo.gl/98QcPN