Applets vs Webstart applications

13 views
Skip to first unread message

Ewald Horn

unread,
Jan 6, 2011, 8:52:55 AM1/6/11
to CTJUG-Tech
Hi.

I've got a bit of a question that I need some opinions on.

I have an application that I want to make web-accessible, for a few
select individuals. This application reads a central database and
displays some statistics and allows some modification of the data via
simple dialogs. It's currently a desktop application running on an
internal network. This is not sensitive data, so I'm not concerned
about security except for a basic user name and password check.

What would be the simplest way to make this a tool that is accessible
via the web?

I could use webstart, as I'm doing with the desktop application at the
moment via the intranet, but that would require a dedicated server
type of configuration, correct? This would be for allowing external
applications to access the database. My other alternative is to
convert the application into an Applet that can access the database of
the web host, for example, the MySQL instance that I know is currently
available on the server. We are not talking more than a couple of
hundred records here, so I'm thinking the Applet solution is not such
a bad call.

Here's my question : Are there any show-stopping downsides to using an
Applet in this instance? I've done a bit of browsing and looked at
some applets and there doesn't seem to be a reason not to use an
Applet, but as my Applet knowledge is very basic, I'd like some input
please.

Regards
Ewald

Jaques Smith

unread,
Jan 7, 2011, 1:29:24 AM1/7/11
to CTJUG Tech
Hi Ewald,

If you have it as a Webstart application now why change anything. Your
connection to the database will be the same. In both you need a
accessible database, or you can do some indirect database connection
but that is just not cool.

Jaques

Ewald Horn

unread,
Jan 7, 2011, 1:33:50 AM1/7/11
to ctjug...@googlegroups.com
Hi Jaques,

thank you for the reply.

I was under the impression that a Webstart application is treated just
like a normal Java application, so for it to access the remote server
database, I would need to open the database port on the server. This
does not appear to be a requirement with an Applet as the Applet can
directly access the database on the server as it also resides on the
server.

Am I completely missing the boat here?

Thank you
Ewald

Brendon McLean

unread,
Jan 7, 2011, 1:44:08 AM1/7/11
to ctjug...@googlegroups.com
Yes.

There is no difference between Applets and Webstart applications other than:

a) You can embed an Applet
b) You can potentially talk to the webpage itself.

The applet resides on your local machine and you'll need to open a port to the database. If the database is on a different server, you'll need to sign the applet or get cross site scripting working.

Personally, if there was any doubt these days, I'd write a pure webapp.

Brendon

> --
> You received this message because you are subscribed to the Google Groups "CTJUG Tech" group.
> To post to this group, send email to CTJUG...@googlegroups.com
> To unsubscribe from this group, send email to CTJUG-Tech+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/CTJUG-Tech?hl=en
> For Cape Town Java User Group home page see http://www.ctjug.org.za/
> For jobs see http://jobs.gamatam.com/

Ewald Horn

unread,
Jan 7, 2011, 1:49:16 AM1/7/11
to ctjug...@googlegroups.com
Hi Brendon,

thank you, I will upload the Webstart files to our web server and try
to get it running that way. The primary reason I do not want to go for
a Web app is that I also have a few graphs that are interactive (the
user can click on items to drill down) and I really don't feel like
rewriting these in Javascript or Flash. Java2D is currently being
used for the "animation", so a webapp would require quite a bit of
re-engineering.

Thank you, I hope I can get the Webstart application working from our webserver.

Regards
Ewald Horn

Herman Lintvelt

unread,
Jan 7, 2011, 5:43:06 AM1/7/11
to ctjug...@googlegroups.com
Hi Ewald

What we do a lot that works well is to expose the necessary domain API via some web services, and then have the Webstarted app (or any other rich desktop/mobile app) use the webservice. This is much more flexible, scalable, and all the the other *ables than directly connecting your client-side app to the database. 

These days a lot of tools and frameworks exist that makes it easy to wrap your domain-layer with a web service layer.

Regarding your applet vs webstarted app question: applets are just plain ugly (for that matter, any rich UI app running in a browser is ugly). Webstarted apps just looks much better (or can, if they are implemented well). 
And you will not gain anything on the applet side: it still has to be signed (just like webstart apps), and it still has to make the database connection, as Brendon said. 
In both cases the jars of the app is downloaded to the client side and executed on the JVM there.

Groete,
 Herman


Herman Lintvelt
Polymorph Systems - User Interface Excellence
Twitter: hermanlintvelt
Skype: hermanlintveltza


Ewald Horn

unread,
Jan 7, 2011, 5:49:15 AM1/7/11
to ctjug...@googlegroups.com
Hi guys,

thank you for the feedback, I'm going to stick to a webstart solution
and rather invest in a dedicated server.

I like the idea of rolling the domain layer into a web service and
will be investigating this once the initial app is up and running with
global access.

Thank you for the assistance, I appreciate the great advice.

Regards
Ewald

Michael Wiles

unread,
Jan 7, 2011, 6:06:19 AM1/7/11
to ctjug...@googlegroups.com
I just did a test... tried to open a java applet in Chrome, Firefox and Internet Explorer. I have java installed but none of the browsers was able to open the applet! Suffice to say, applets were forgotten by Sun and Oracle doesn't remember them either. Besides, applets IMO always appeared alien to a browser. The idea was good - to be able to embed a rich application in a browser, but the execution was weak. Flash/Actionscript whatever else was a better execution.

Just to clarify, what do you mean by dedicated server? Why do you need a "dedicated server" for the webstart solution?

--
You received this message because you are subscribed to the Google Groups "CTJUG Tech" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Tech+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Tech?hl=en
For Cape Town Java User Group home page see http://www.ctjug.org.za/
For jobs see http://jobs.gamatam.com/

Brendon McLean

unread,
Jan 7, 2011, 6:15:01 AM1/7/11
to ctjug...@googlegroups.com
I would hesitate to say your test was conclusive though.  

I wrote an applet under contract for a telecoms company last year, and with the newer applet tags, things did just seem to work.  Sun did quite a bit of work on Applets over the last two years and if you use the current guidelines for applet deployment, it works pretty well.  We tested across default installs of Windows XP, Vista on Firefox and IE7 and up, and on the latest Macs across Safari and Firefox and they all worked.

Having said that, I agree there is very little reason to use an applet.  But this telecoms company had a very good reason.

Regards,
Brendon.

Ewald Horn

unread,
Jan 7, 2011, 6:15:39 AM1/7/11
to ctjug...@googlegroups.com
Hi Micheal.

I can open applets in IE7 and Firefox 3.6.13, no problems at all.
Perhaps the JRE plugin is disabled on your system.

By dedicated server, I mean that I need to be able to give my webstart
application access to the database running on the server, no way to do
that with a shared-hosting account, so I have to add a R250/pm
overhead to the website cost to be able to do that. I was hoping to
get around that with an Applet, but it seems to me that that won't
happen.

Regards
Ewald

Michael Wiles

unread,
Jan 7, 2011, 6:23:54 AM1/7/11
to ctjug...@googlegroups.com
hmm.. I see. Thanks for clearing it up. 

If you can have tomcat on a shared environment you could expose your API's via rest - that way you can use the http port.

In a sense I'm glad it's only me that cannot open applets.


Regards
Ewald

--
You received this message because you are subscribed to the Google Groups "CTJUG Tech" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Tech+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Tech?hl=en
For Cape Town Java User Group home page see http://www.ctjug.org.za/
For jobs see http://jobs.gamatam.com/
Reply all
Reply to author
Forward
0 new messages