Stephen,

  First of all, thanks for taking the time to look at ProtoRPC.  I
appreciate any and all feedback I can get.

  ProtoRPC is actually a somewhat simplified version of Googles
protobufs.  An important thing to remember about Protocol buffers is
that they are meant to be used in multiple contexts, for example using
streaming sockets.  Since ProtoRPC is compatible with protocol
buffers, it is intended to be used to make writing services in those
contexts easier as well.

  REST is something that is specific to HTTP.  It has a much more
complex URL and message mapping structure on top of the need to
specify content structure.  It's also intended to be resource based,
which I've always liked, but not every service is going to deal
directly with resources.

  Might be neat to have a way to map REST-space to RPC methods.  That
way you might get the best of both.


On Mar 18, 8:17 am, Stephen <[email protected]> wrote:
> On Thu, Mar 17, 2011 at 9:48 PM, Rafe Kaplan <[email protected]> wrote:
>
> >  class HelloRequest(messages.Message):
> >   my_name = messages.StringField(1, required=True)
>
> >  class HelloResponse(messages.Message):
> >   hello = messages.StringField(1, required=True)
>
> >  class HelloService(remote.Service):
>
> >   @remote.method(HelloRequest, HelloResponse)
> >   def hello(self, request):
> >     return HelloResponse(
> >                          hello='Hello there, %s!' %
> >                          request.my_name)
>
> >  $.ajax({url: ‘/hello.hello’,
> >          type: 'POST',
> >          contentType: 'application/json',
> >          data: ‘{ my_name: Bob }’,
> >          dataType: 'json',
> >          success: function(response) {
> >            // The response is { hello: “Hello there, Bob!” }
> >            alert(response.hello);
> >          }
> >         });
>
> Why expose an RPC style interface rather than REST style?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to