Re: APPLET tag
On Apr 12, 6:42 am, Lew <no...@lewscanon.com> wrote:
.. Once we've articulated exactly
what the magic of applets is, we'll more clearly comprehend what we need to
make them actually be that magical.
- Applets can be good for active content which is naturally
part of a web page.
- Interacting with a web page (usually using JS in some form).
- They can also be good for launching Java apps 'with
configurable parameters', when the server is /not/ an
active server (e.g. supports servlets, PHP, ASP..).
I.E. We can have a form for configuring an applet page.
JS on the applet page reads the entire URL and
parameters (N.B. Java's own getDocumentBase() and
related methods do not generally return URL query
parameters) and configure the APPLET element accordingly.
An example of this can be seen in the 'Sourcerer' HTML.
<http://pscode.org/fmt/sbx.html?url=/fmt/sbx.html&ln=108>
(Except that JS is being invoked directly from the applet
code - the applet element declares the MAYSCRIPT* flag,
to achieve this.)
<rant>
OTOH, I think the reason most people code applets, is
because of the way that the Java Tutorial is structured,
with many 'trivial examples' (especially when they deal
with sound and images) being done as applets.
These examples lead the unwary to believe that applets
are 'very simple', whereas *reliable* applet deployment
(to users on the World Wild Web) is one of the hardest
things to get right.
Many of the applet questions I see, do not fit the simple
criteria that favor (or require) an applet. It astonishes
me that so many people, when I suggest JWS over applets,
say something like "Cool! When did Sun introduce that?!".
I would bet money** that many of those people have actually
clicked links pointing to JWS apps. previously, but the
entire process was so quick and easy they did not stop to
think about how it was achieved!
</rant>
* A thread 'around these parts' (c.l.j.p.?) suggests that
FF3 no longer recognizes the MAYSCRIPT flag. The latest
in a long, long.. line of niggling applet problems (sigh).
** Though I generally do not gamble.
--
Andrew T.
pscode.org