Hi,
We have an application that is currently implemented as a standalone
app using Swing. We wanted to move that app to Web. Two possible ways
discussed were:
o Wrap the swing app in an applet.
o Re-write the GUI using JSP/Servlets
Obviously using the applet way we could be done a lot faster than
rewriting in JSP.
I would like to know if there are any specific drawbacks by moving
Swing to applet.
Thanks.
Andrew Thompson - 27 Mar 2004 07:41 GMT
> We have an application that is currently implemented as a standalone
> app using Swing.
3D modelling? Accounting/Payroll?
Solitaire? What?
>..We wanted to move that app to Web. Two possible ways
> discussed were:
>
> o Wrap the swing app in an applet.
JApplet
> o Re-write the GUI using JSP/Servlets
If you can do that, your clients
can run your app from any browser
with or without Java - wider potential
audience..
> Obviously using the applet way we could be done a lot faster than
> rewriting in JSP.
Volume/length of use, size of user base
(600-700 other qns)?
> I would like to know if there are any specific drawbacks by moving
> Swing to applet.
Applets have a much tighter security
wrapped around them than an application,
they must be signed to do any serious
networking, any file I/O.. What does
your app. actually do?

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
zn?rt - 31 Mar 2004 21:08 GMT
>Hi,
>
[quoted text clipped - 10 lines]
>I would like to know if there are any specific drawbacks by moving
>Swing to applet.
I guess drawbacks will depend on the nature of your app. Any requisite
for a regular applet that your app can't meet will be a drawback.
If you use swing, you'll build a JApplet, and this will require java
plugin on clients. You will most likely need access to local resources
beyond the sandobox limits, so you will need to sign your applet. This
is easyly done with the jarsigner tool from the jdk, with your own
certificate.
Application size may be an issue but, again, it depends on where you
expect the applet to be used (internet, lan..?).
You'll have to check any dependencies. Your runtime environment will
be different now, and you hav to assure that any dependencies are
bundled with the applet or otherwise accesible, and are working
properly under new conditions.
If your app does things like custom configuration handling using local
resources, they should be checked too. You can end up having your
applet creating config files right on the desktop, and funny things
like that.
Also, the new environment can be a very different experience for the
user. If your app creates many dialogs, you should make sure the user
understands the difference between the browser windows and other
dialogs, specially if they are modeless. Keep in mind that an applet
can be easly dismissed by the user issueing browser navigation
commands (even by accident :D). On the other hand, modal dialogs will
suspend the browser (not just the applet).
And, of coursel, If your app isn't already, you'll have to pack it in
a jar file, along with it's resources, but this is allways a good
idea.
It is indeed possible, and if it really makes sense for your app to
run as an applet, you'll probably make it with little efort. And it
can be a very pleasant experience to see an app in this new dress :-)
znôrt