GWT vs Java Web Start

327 views
Skip to first unread message

ian.a.desouza

unread,
Aug 15, 2006, 11:20:11 AM8/15/06
to Google Web Toolkit
I searched but really could find a discussion of the pros and cons of
these two technology platforms for dynamic web based apps.

Any issues anybody can think of?

For starters, I usually make heavy use of java reflection and that
would probably eliminate the possibility of using GWT I would think.

- Ian

claude

unread,
Aug 15, 2006, 11:33:33 AM8/15/06
to Google Web Toolkit
Technologies that force large installs of a Java runtime have been
largely unsuccessful. They require a major interruption in user flow
and agreement to intrude on their system, not to mention problems users
could encouter along the way.

GWT delivers a rich user experience, with a lightweight solution, as
seamlessly as possible. Users dont' care what technology you use. They
care only about how well things work.

Eric B

unread,
Aug 15, 2006, 10:47:56 PM8/15/06
to Google Web Toolkit
I have used both and your decision will really be based on the needs of
your Java app.

If you look at the GWT documentation, it lists the Java classes (under
JRE Emulation Library) that have been ported to JavaScript. Note that
the java.lang.reflect package has not been ported. However, if you
look at the Service documentation, they do some cool stuff with
reflection. On a side note, I much prefer to implement with Interfaces
than use reflection. In my opinion, Interfaces are faster and easier
to design and maintain, but for some apps reflection is definitely
needed.

If you have to use Java classes from J2SE that are not ported to GWT,
then you should stick with JWS. (Actually I recommend looking at the
Eclipse Rich Client Platform if you are creating a desktop app, which
has a better updating mechanism in my opinion) However, if you don't
require your app to work without an internet connection, you could
split your desktop app into a client/server app and put all your
non-ported Java code in Services that the GWT app calls on
asynchronously. Again, it comes down to the needs of your app, how far
along you are, and how much time you are willing to spend changing your
design.

However, if you can implement your program using the limited Java
classes provided by GWT or as a client/server app, then I would suggest
doing so. With GWT, your users don't have to have the Java JRE
installed nor do they have to wait for a lot of stuff to download all
at once for JWS (if you write your GWT app with good programming
style).

Thanks,
Eric

ian.a.desouza

unread,
Aug 16, 2006, 4:51:07 PM8/16/06
to Google Web Toolkit
Thanks Eric,

I'm using both interfaces and reflection, some framework classes just
require associated interfaces (sometimes base classes, but still
interfaces generally speaking), but use reflection to instantiate the
particular instances of those kinds of interfaces (named using xml
files). Views, models, and controllers glued together at runtime. I
think until we get flection in GWT (I would assume it would pull
dynamically, the generated javascript from the classes when
instantiating using reflection, if GWT ever gets reflection), I'll go
with the JWS approach.

ian.a.desouza

unread,
Aug 16, 2006, 4:57:53 PM8/16/06
to Google Web Toolkit
I suppose if the app was very large there would be a first time hit in
loading the required jar files, but after that they should be cached.

The user can gain then gain a dynamic rich web app with possibly
simpler developer efforts (compared to GWT, although GWT has narrowed
that gap somewhat in relationship to HTML forms).

tobermory

unread,
Aug 16, 2006, 7:21:32 PM8/16/06
to Google Web Toolkit
Ian, I would second what Claude has said. The install procedure, and
all that can go wrong, is way more problemmatic with any JVM solution
over a JS one. I have done applets and some jnlp apps and the users
give up when "it doesn't work for me, is there a browser solution"??
My worst experience was with the Java 1.3 plugin that had a bug in
HttpUrlConnection, so I had to encourage users to upgrade to 1.4+.
Horrid affair.

That said, jnlp has some very nice features if you take time to go
through the spec and learn what it can do. If working OK, you can
download entire VMs to run an app, include libs like Java3D in your
jnlp app. A real no-no is to have an out-of-band dependency on some
other Java library, like Java3D for example.

Stuart

bruciadmin

unread,
Aug 16, 2006, 9:45:57 PM8/16/06
to Google Web Toolkit
I was about to post that if the app your developing has a large 2D or
3D modelling component java web start would be better - but there's no
reason that this kind of functionality couldn't be isolated within a
GWT application in the form of an applet. Communications between the
GWT application and the applet might be tricky however.

ian.a.desouza

unread,
Aug 17, 2006, 4:05:12 PM8/17/06
to Google Web Toolkit
Thanks you Stuart and Dave for the advice. I don't expect a large
download (other than the initial jre) which it seems like with the new
jdk5/6 seems a bit simplified -- just specify in the jnlp the jre
version and JWS handles the rest. The GUI should then just be able to
communicate via RMI back to the server for synching data between
various clients.

Reply all
Reply to author
Forward
0 new messages