• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Rule of Thumb question...

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic