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
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.
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
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.
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).
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