• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Rule of Thumb question...

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you know when to use Applet vs. Servlet since (for the most part) they can do the same thing... or can they?
( Still learning this stuff, so gotta ask questions... )
Thanks!
[ July 22, 2002: Message edited by: Sam Smoot ]
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are quite different things.
An applet is a piece of code which is downloaded by a user's browser, and is run in a strictly-controlled "sandbox" on the user's machine.
A servlet is a piece of code which is run on a (typically remote) server.
Servlets are typically used to serve up HTML pages for the browser to download, and work together to make a "web application".
Applets are typically used to provide little programs which run "in" a browser and provide things not possible with HTML or JavaScript (like moving graphics, or querying a remote database).
Confusing them can lead to a lot of misunderstandings about what code is running on which machine.
 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, sorry 'bout that... I knew that much, but I didn't have enough caffeene yet. What I'm wondering is:
If I have a web application that connects to a database, when is it best to use an applet and when do I use a servlet? As to scrolling marquees, etc. there are other technologies (Flash in particular) that are out there that seem to eliminate some needs for an applet class... (ok, beat me up on this one, but you have to have either the player or the correct JRE plugin downloaded, so they're almost even in this respect). Which method would be more secure for data access? Which would be more reliable?
Thanks.
[ July 22, 2002: Message edited by: Sam Smoot ]
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic