Hi, Rafe Kaplan from the Google App Engine team here. I'd like to let
everyone know that we are soon to release a new tool called ProtoRPC
that will allow developers to easily build simple web services and
deploy them to their App Engine applications. ProtoRPC is designed to
be easy to get started and powerful enough to grow.
For the time being, ProtoRPC is only available on Python. If you are
familiar with writing App Engine DB models and webapp handlers,
specifying ProtoRPC services should be seem familiar to you. For
example here is a simple service:
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)
Here we've defined a single service called HelloService that has a
single remote method called hello. Remote methods receive messages as
their requests and send messages as their responses. Defining a
message is very similar to defining a db.Model class. Defining a
service is very similar to defining a webapp.RequestHandler class and
is similarly mapped to URL paths within your webapp.
Here's one way to hook up to the HelloService using JQuery:
$.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);
}
});
To learn more about ProtoRPC please visit the open source project
website and check out the getting started guide. You should consider
this library to be experimental, however we do plan to include it in
the App Engine Python SDK soon. It would be really great to hear some
early feedback from developers about their experience so that we can
make it better.
Project site: http://code.google.com/p/google-protorpc/
Getting started guide: http://goo.gl/NgcbD
--
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.