I'm working on a small webapp in App Engine, using Angular for the frontend. I've looked through the documentation for Google Cloud Endpoints, but I'm having a hard time finding significant advantages over just writing normal handlers that return JSON. Here are the advantages I've found:
On the other hand, the syntax for specifying endpoints is kind of ugly (compared to specifying request handlers in webapp2, flask, etc.). Are there any advantages I've missed or challenges I'm not predicting? If not, what's the point of Cloud Endpoints?
Endpoints is a convenience way for services used by both, web and mobile apps, but with restrictions. I will not recommend it for web-only apps.
Endpoints facilitates creating a single data serving API for web, Android and iOS. Same can be achieved by defining your own REST/JSON API. Difference from REST/JSON service are:
Advantages
Major: It generates native client libraries for Android and iOS devices native app.
Conversion to and from JSON is done without defining any mappings.
Easy "Google" auth integration (but 'only' Google auth, with experimental OpenID support)
API explorer is a good value-add for Abstraction as well as Admin UI (but lacks some basic expected features, like support for 'Date' type parameter)
[afterthought] By using Endpoints with integrated login and hosting on app-engine, most of authentication related security concerns are offloaded to Google
Disadvantages
Major: No control over JSON conversion. You end up changing your entity structure/code to what Endpoints can handle. e.g. no Generics (in Java)
No control over error handling during the conversion. e.g. if a lazy loading call encounters a problem, then JSON conversion fails without giving details of what broke inside.
Discovery service part that loads API for your API-root (Google probably doesn't need it) has poor browser support.
[Edit: Not applicable anymore] As @Josh mentioned, there is no custom domain support. Workaround is to use appengine domain internally for endpoints calls, which comes with overhead to maintain domain mappings for all environments.
The most important point of google endpoints is the ability to have scalable solution rather than using IAAS platform as Amazon. Moreover the integration with google app engine .
The API explorer plus the client generated libs are to my mind only a "nice to have" feature rather than the main reason to choose Google Cloud Endpoints over any simple SA server in the cloud.
Other advantages are the API metadata that can control access control , clients allowed , versioning , and built in transformation.
The nice thing for me was that everything in this platform was really intuitive and done with maven commands , including deploying the app to the *.appspot google cloud.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With