I always had a love/hate relation with GWT-RPC. I loved it that indeed it allowed you to quickly add remote calls.
But in bigger applications many of its restrictions started to have a big impact.
For example it was a pain to do proper integration or performance testing with GWT-RPC services since they can change with any build. The serialisation cost was another issue for me. GWT-RPC gave the impression that any java serialisable object tree can be serialised, but in reality you better avoid sending deeply nested graphs because the performance was terrible. So in the end I had to start optimising the object structure and do some reconstruction at the client side.
I moved to RestGWT now. This is really easy to use as well, even easier. I just annotate JAXRS services on the server and the client can consume this without any code replication. I don't need an async api. By using pure REST api's I can now easily integrate different clients with the same interface.
On Fri, Feb 5, 2016 at 10:57 AM <gwtarplayer@gmail.com> wrote:
I understand that the future of GWT RPC does not seem bright in 3.0+ but I want to express my opinion that this is a HUGE mistake. GWT RPC is one of the most important things in GWT as it truly ties things together in large apps. Sure, it its raw form it is a bit cumbersome to use but it enables true code reuse with no extra coding. This is what sets GWT apart from the run-of-the-mill frameworks out there. Creating custom requests and responses is not maintainable and scalable in a large app that depends on extensibility and polymorphism. Ability to communicate almost any Java object graph without having to specifically annotate or declare anything, while preserving singletons is a huge advantage.--Sure, it lacks a lot of things. We used it with out proprietary wrapper framework in a way that allows us to simply annotate sever-side methods we want to expose to the client and everything else is automagically handled - the client gains the visibility into relevant server classes and methods with same signatures other than getting results asynchronously. One can pass results of some method call as an argument of another all without leaving the sever and without having to wire boilerplate/weird code.For example, if we had the following code on the serverpublic class Foo {
public static Bar getBar() {
return new Bar();
}
public static String someText() {
return "Blah: " + System.currentTimeMillis();
}
}
public class Bar {
public String twice(String text) {
return text + text;
}
}
.... with our annotations on the server (not shown) the following client code would be possible:Foo.getBar().twice(Foo.someText(), new AsyncCallback<String>() {
...
public void onSuccess(String result) {
...
}
}... no need for creating server + async interfaces, etc.With every other alternative we lose on simplicity and ability to communicate. All others require us to create more client-server communication code which we have been able to avoid.Needless to say, we'd be stuck in pre-3.0 land as we have a large code investment in GWT RPC - we could not accept losing it... but we do want to go to the newest GWT at any time. It would be greatly disappointing if we couldn't do this.I do not see the advantages of losing RPC. It does what it does better than anything else out there and is irreplaceable.Please do not get rid of it. Enhance it. It is what makes GWT better than the rest. It is what, together with the rest, allows seamless and uniform language use across the client and the server.
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment