excellent!
> Thanks to Luke Kenneth Casson Leighton (creator of pyjamas)
well, it was james tauber, originally - i'm now the maintainer and
lead developer, but thank you.
the JSONRPCService class, btw, is truly a total independent JSONRPC
service that has absolutely nothing to do with pyjamas, and so could
equally well be utilised for other web2py projects.
controllers/default.py shows how incredibly easy it is to create a
web2py jsonrpc service (s/pyjamas/jsonservice in both controllers/
default.py and models/pyjamas.py so as to psychologically disassociate
"pyjamas" from "jsonrpc").
literally by sticking the decorator on the front of a function,
magically it's turned into one of the methods of the service.
i presume that by sticking an extra decorator (@auth or such) you'd
have an _authenticated_ web2py jsonrpc service, with as much
simplicity and ease.
of course... good JSONRPC clients are hard to find - at least, they're
damn hard to use well in "pure javascript". personally i wouldn't go
_near_ JSONRPC if it wasn't for the utter simplicity with which
JSONRPC services can be used when you get the pyjamas compiler to
compile the python code into client-side javascript.
however, the web2py jsonrpc service could equally as well be utilised
with a GWT app, if you love java or something.
so the addition of the jsonrpc service to web2py really does open up
the possibilities for web2py quite considerably.
l.