My Thoughts

7 views
Skip to first unread message

Gabriel

unread,
Mar 17, 2010, 3:34:02 PM3/17/10
to restful-gwt-discuss
Hi,

This is a very nice idea and it addresses a very common problem. I
would like to see this project grows and stabilizes as I have yet to
see a better solution to the RESTful navigation and state management
in GWT.

I have a few comments and suggestions:

1. It should be possible to bind the navigation to a specific panel,
and not just to the RootPanel, in order to keep constant parts (such
as navigation menus) always visible and outside the scope of the
specific "pages".

2. I suggest changing the initial configuration mechanism.
"Inheritance is evil" - some people may not like the requirement to
change their EntryPoint and onModuleLoad(). A possible direction to
investigate is to use GIN ( http://code.google.com/p/google-gin/ ) for
the initial configuration.

3. It would be nice to see use cases of integration with GWT MVP
( http://code.google.com/p/gwt-mvp/ ). MVP can really bring order to
the client side code and although it has a history management
mechanism, RESTful GWT makes it much more clear.

4. I'm not sure that JAX-RS is right for this use. Although people may
be familiar with it, the functionality in GWT doesn't seem close
enough. For example, you can't use any method except GET, you are
limited to content types of HTML, text and Widget, and you can use
void return type. An important point to address is the asynchronous
nature of GWT code. For example, before you view something, you may
want to fetch data from the server. Though the current implementation
allows this using void method, it may be nicer to have the split
between the code that interacts with the server and the code that
handles the view in the same spirit as MVP.

I'm going to experiment with this framework and post any further
findings and ideas I may come up with.

Gabriel

Alexandre Thiel

unread,
Mar 17, 2010, 4:20:35 PM3/17/10
to restful-g...@googlegroups.com
Hi,

Thank you for your feedback, i agree with all those points :

1 & 2. There is definitely some improvement here. I'm still looking for the best way to do that. I'm looking for a way to map parts of the DOM or widgets tree with parts of the url/token.

3. I've looked for libraries that deals with history management without success, haven't looked at gwt-mvp at all yet, i'll look at it. 

4. I don't intent to provide a strict implementation of JAX-RS. I just though it would be cool to support a String return type in order to make a hello world that run on both client & server side :)
I've thinked about the async problem, the best idea i came up with, was  to write this :

@Path("hello/{xxx}")
public void sayHello(@PathParam("xxx") String a, Callback<Widget> callback);

the framework would auto fill any callback parameter, show a loading dialog before call and when data is available, treat it as an usual return type.
But i'm not satisfied with this solution.

maybe :
public HasCallback<String> sayHello() ?

Still looking :)

Again, thank you for your feedback !
Reply all
Reply to author
Forward
0 new messages