Meaningless Drivel is fun!*
The moose likes Applets and the fly likes What is the purpose of an applet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "What is the purpose of an applet?" Watch "What is the purpose of an applet?" New topic
Author

What is the purpose of an applet?

krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Hi everybody, I am Krishna, I have a doubt on why to use applets in web applications. I googled, but I did not get the purpose, everybody is talking about how to use and how applets can interact with javascript nad how javascript can interact with applets. But I need the purpose.

I am thinking that applets can be used for playing animations, ads, songs in web browzer, to take input from user and validate it. If java script is disabled in the browzer the clients inputs are to be checked at the server. It becomes a burden on server, so we use applets to take input from user, the jre in the web browzer executes the applets and validats the data and valid data is sent to the server.

This is all I know about applets. If am right please give me few more examples, if wrong please tell me the purpose of an applet.

Thank you all in advance and have a nice day.


There is no rule that we all should know everything. Lets learn few things of everything here.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

Applets are generally viewed as pretty old-fashioned and I see very few of them still in service.

Using an applet -- or any other client-side validation -- does not relieve the server of doing validation. All data must be validated on the server regardless of what you do on the client. Otherwise, you open up your application to a myriad of security issues.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Thank you Bear. Please tell me how to use applets now a day? How it is useful for me?

In one text book they said that applets can retrieve passwords from the client machine with out the user knowledge. Is is possible? How can one do that? Where can I learn to do that kind of stuff?

Thank you in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39575
    
  27
Applets are rarely used for client-side validation; most of what they could do in that regard could be done in JavaScript as well, and since one would have to do the validation on the server anyway, there isn't much point in putting lots of complicated validation on the client.

In order for applets to get at any client-side data it would need to be signed - and the user would need explicitly to accept the signer's certificate. That's not something one would do lightheartedly, so the prospects of applet code getting out of the security sandbox are slim.

Over time, more and more of what applets were used for can be done in other ways. For example, HTTP communication with a server is possible through JavaScript, more and more browsers support animation through the canvas element, client-side Java application are now delivered through JavaWebStart etc. And Flash reigns for rich client-side content, of course.

Graphics are still something that's hard or impossible to do in the browser, so a lot of interactive (or at least animated) educational material is delivered as applets; check out #24 in the JavaBeginnersFaq for some examples.


Ping & DNS - updated with new look and Ping home screen widget
krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Thank you Dittmer for the short and bold explanation. Moreover I did not understand JavaWebstart. I will google it. If I get confused I will come her.

Have a nice day.
krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Ulf Dittmer wrote:
In order for applets to get at any client-side data it would need to be signed - and the user would need explicitly to accept the signer's certificate. That's not something one would do lightheartedly, so the prospects of applet code getting out of the security sandbox are slim.


Hi Dittemer, can you explain what is signer's certificate in a simple way. Thank you in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39575
    
  27
See HowCanAnAppletReadFilesOnTheLocalFileSystem for details.
krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Thank you Dittmer, the link you have sent is very nice and useful. Thanks a lot.
 
jQuery in Action, 2nd edition
 
subject: What is the purpose of an applet?
 
Similar Threads
Communicating with a process thru a browzer
Is there a tree style component available for jsp?
applet servlet communication
servlet load issue
servlet load