GWT with Restlet?

32 views
Skip to first unread message

Justin Stanczak

unread,
Dec 16, 2007, 4:24:45 PM12/16/07
to Google Web Toolkit
Anyone using this combo? Is GWT-REST good for this? Just curious.

Jon Crosby

unread,
Dec 16, 2007, 5:53:44 PM12/16/07
to Google Web Toolkit
Justin,

I created GWT-REST for just this sort of purpose. It's flexible enough
to adapt to more than one style of REST API, Restlet included. (Good
choice, by the way.) GWT-REST includes basic Javadocs, and a basic
tutorial is in the works. (Friday was its release day.) If you would
like to try it with Restlet, feel free to email me off list and I'll
gladly assist. We can incorporate any changes back into GWT-REST to
share with others.

Jon Crosby
j...@kaboomerang.com

Justin Stanczak

unread,
Dec 16, 2007, 8:04:38 PM12/16/07
to Google Web Toolkit
Ok, I'll give it a look. I've been using the RPC, but I've used
Restlet before and really like it. Not sure what direction I'm going
yet.

Justin Stanczak

unread,
Dec 16, 2007, 8:36:08 PM12/16/07
to Google Web Toolkit
I just posted in another topic, but what security does your method
use, or you suggest? Security as in access control? I know your api
wouldn't have something, I'm really asking what you'd suggest if you
where setting up access control in your application. In Restlet I just
used the challenge and response method, but I'm not sure how you'd do
this and present an ajax login dialog. Or get the user permissions.

On Dec 16, 5:53 pm, Jon Crosby <jon.r.cro...@gmail.com> wrote:

Jon Crosby

unread,
Dec 17, 2007, 1:10:16 AM12/17/07
to Google-We...@googlegroups.com
As you guessed, the GWT-REST module does not include authentication
mechanisms as many are possible in the context of a REST architecture.
It really comes down to this: for each HTTP request, check user
permissions for a given operation against a resource on the server
side. If they are not authorized, return an HTTP 401 and GWT-REST will
call the onError method of your ResponseHandler so that you can react
appropriately. You may want to alter the scenario slightly for users
who have not yet logged in, redirecting them to your login page.

As for my login screen, I use OpenID, creating a Session resource and
redirecting to the GWT interface if successful. Upon logout, the
Session resource is destroyed.

The above discussion mostly relates to REST with GWT in general which
is probably appropriate for this group. However, if you have more GWT-
REST-specific questions, please join the new GWT-REST Google Group:

http://groups.google.com/group/gwt-rest

-Jon

Justin Stanczak

unread,
Dec 17, 2007, 10:20:45 PM12/17/07
to Google Web Toolkit
Yes, this is the method I usually use. I should probably just use this
method and quit trying to get complex.
Reply all
Reply to author
Forward
0 new messages