2
votes

I've defeloped a GWT + GAE app using GWT RPC mechanism for client-server communication. Now, I want to integrate some of the services offered in an Android app. But I have discovered that this implementation is no longer recommended and has been removed from GPE 3.0 (google eclipse plugin), so the cloud endpoints is now used (RPC tooling not available for appengine connected android project for GPE 3.2?).

I would like to know why is this method adopted (and the other one removed suddenly), because the code needed for implementing client-server communication seams much more complicated (for me at least) when using Cloud Endpoints, rather than GWT's RPC, where it's very easy to add new classes, the code seamed very easy to scale.

Why is Cloud Endpoint better than GWT RPC? What are the advantages and disadvantages of these two approaches ?

2

2 Answers

4
votes

The advantage of cloud endpoints (and other REST/JSON based solutions) compared to GWT/RPC is that they are language agnostic. In the case of cloud endpoints, Google tooling directly supports Android, Web, and iOS, but since they generate a description of the interface they can also support any technology that can use that description.

Endpoints also makes OAUTH authentication relatively easy, but I can't comment on how that compares to GWT.

1
votes

My personal opinion: they both suck, because they are proprietary and opaque. Google is a great engineering company, but this two are IMO both a mistake. I guess they wanted to tie developers to their proprietary APIs - this is so MS from 1990s.

I use REST+JSON. My personal favourites are RESTEasy + Jackson, which work flawlessly on GAE.

Advantages:

  1. Flexible serialising: Jackson can make advanced mappings between classes and JSON (multi-to-one, embedded, getters/setters, etc), you can also write custom serializers.
  2. Full control of the stack: you can have multiple endpoints (e.g. public/private) with different configs, you can also intercept and augment requests, custom exception handling (throw custom exception -> RESTEasy creates custom JSON as response)
  3. Interceptors allow for use of standard or custom authentication schemes
  4. Fully open sourced and using standard protocol and serialization format: easy to inspect what is going on in browser
  5. Portable: works on all servlet-based servers and clients (browsers, Android, iPhone, etc..)

Granted, the learning curve is a bit higher, but at least you'll be in control.