• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Philosophy (when to and not to use an applet)

 
Charlie Collins
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wanted to ask some of the gurus about their approach to pros and cons of using an applet. I am new to this site and to applets but am not new to java (programming various languages for years.)
Here is my view, right or wrong, I would like to know if I am on the right track or not and why (either way.)
Applets are not a very good idea except in very specialized situations where the client can be specified (and that is not acceptable in my opinion on a website for the general public, tech site, maybe.)
Using servlets (and JSP, another type of servlet) all code is server side except HTML render (which is a non issue, if written correctly, w3c standards, it will render in any compliant client, ie browser) this eliminates all client side crap. What version of browser, what JVM, etc. Using applets code is downloaded and run on client JVM.
I only see one reason to even consider using an applet. Performance should be better if actions happen on client side (without a trip to and fro to server each action.) However, considering the inherent problems with client side jvm implementations (and non implementations, ie windows xp, etc) is the performance gain justified (this might depend on what the applet is, just how big, how much is going on etc.) It seems to me that on a general public website this is just asking for problems and the performance gains would NOT be worth the risk. Doing whatever the applet can do on the server side should not be that big of a hit (of course performance metrics would help, but I would like to address this BEFORE building the applet or servlet for hypothetical task.)
Of course, "thats just my opinion" ask DM would say. Am I way off base or what?
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not everything works well in HTML. A common example is tabular data entry. If you do that with an HTML table, you can't dynamically "grow" the number of rows (it also takes up a lot more screen real estate). Charting is another example. It's much more efficient if you're playing "what-if" games not to download a massive graphic from the server each time you tweak a parameter. You couldn't do the famous real-time satellite tracking app in HTML. Any sort of lightweight data access (stock and headline tickers) are fair game. And so on.
Of course, it would be a lot easier if BOTH Microsoft AND Netscape hadn't saddled us with antique JVMs!
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Charlie -
I think your reasoning makes sense; I would just generalize it a bit. It's really relatively few websites with such a sprawling audience that you can't make any assumptions at all. The usual pressure is business: no business person likes the idea of a technology that could restrict their potential audience. This is rarely the audience a business currently has, in my experience.
There's a lot of noise made about VM incompatibilities when using applets, and for the most part, they're manufactured. There's an impressive case list of all the things that just somehow break in IE (through what appears to be a calculated effort) and through Netscape (through what appears to be carelessness). I've written a bunch o' applets, and never had one of these famous problems. Then again, you don't often hear from the people whose stuff is working fine.
No one technology gets you away from the potential problems of browser incompatibilities, so really it's just a question of picking the technology you like, be it JavaScript, Shockwave, ASP/JSP, servlets, and making it work as best you can.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic