Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: difference between Java Aplet and JavaScript?

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default difference between Java Aplet and JavaScript?

    Hello everyone, I am currently learning about applet in Java (actually quite new to this dimension). I have been searching some information about the applet and tried some coding regarding applet while at the same time discovered something about Javascript. From what I read, they look and sound quite similar to me. But, the fact is, I cant really make a clear distinction between these two. Is there any difference (like in a specific way) between those two? Is it that one is superior than the other or the other way round at the current being? I would greatly appreciate any guidelines/ help that can be provided to clear my confusion.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: difference between Java Aplet and JavaScript?

    Google should give you a good description of each of those.
    If you have any questions about what you find for either item, copy the text here and ask any questions you have about what it says.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: difference between Java Aplet and JavaScript?

    Quote Originally Posted by Norm View Post
    Google should give you a good description of each of those.
    If you have any questions about what you find for either item, copy the text here and ask any questions you have about what it says.
    Now let's talk about how Java and JavaScript differ. The main difference is that Java
    can stand on its own while JavaScript must (primarily) be placed inside an HTML document
    to function. Java is a much larger and more complicated language that creates "standalone"
    applications. A Java "applet" (so-called because it is a little application) is a fully
    contained program. JavaScript is text that is fed into a browser that can interpret it and
    then it is enacted by the browser--although today's web apps are starting to blur the line
    between traditional desktop applications and those which are
    created using the traditional web technologies: JavaScript, HTML and CSS.

    In my opinion, JavaScript's main benefit is that it can be understood by the common human.
    It is much easier and more robust than Java. It allows for fast creation of web page events.
    Many JavaScript commands are what are known as Event Handlers: They can be embedded right
    into existing HTML commands. JavaScript is a little more forgiving than Java. It allows more
    freedom in the creation of objects. Java is very rigid and requires all items to be denoted
    and spelled out. JavaScript allows you to call on an item that already exists, like the status
    bar or the browser itself, and play with just that part. JavaScript is geared to web pages.
    Java is geared toward where it is needed most at the time.

    These two paragraphs are extract from a website I searched. And there are two things that I cant really see it clearly as follows:
    -A Java "applet" (so-called because it is a little application) is a fully contained program
    -Java is geared toward where it is needed most at the time.

    the first sentence: Does this mean that applet is inferior as compared to Javascript in term of its functionality since it is only a little application, as in JavaScript can do more things than what an applet can do.

    the second sentence: where is it needed the most?(considering the word Java is referred to applet)

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: difference between Java Aplet and JavaScript?

    applet is inferior as compared to Javascript in term of its functionality since it is only a little application
    An applet can use the features of the java language to do the many things that the java language can do (with some restrictions).
    It is a fully contained program
    Javascript is bound to the browser and the html page it is in. It can control what the browser displays.
    There are many things it can not do. I'm not up-to-date on javascript and can not give a list of what one can do vs the other.

    For some projects, java is better. For others javascript is better.

    When traveling between two places, sometimes a train is a good way to travel and sometimes an automobile. Depends on lots of things.
    If you don't understand my answer, don't ignore it, ask a question.

  5. The Following 2 Users Say Thank You to Norm For This Useful Post:

    bryanOnInternet (December 29th, 2012), curmudgeon (December 29th, 2012)

  6. #5
    Junior Member
    Join Date
    Dec 2012
    Posts
    9
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: difference between Java Aplet and JavaScript?

    okay, I think I get a clearer picture of this. thank you very much.

Similar Threads

  1. Difference ++j and J++
    By rayan2004 in forum Loops & Control Statements
    Replies: 4
    Last Post: December 4th, 2012, 01:42 AM
  2. Setting a java variable in javaScript
    By shaaaawn in forum Java Theory & Questions
    Replies: 1
    Last Post: September 10th, 2012, 05:10 PM
  3. java to javascript
    By andrewdee in forum Other Programming Languages
    Replies: 4
    Last Post: October 19th, 2011, 08:28 AM
  4. JAVASCRIPT DATE DIFFERENCE PROBLEM
    By jai in forum Other Programming Languages
    Replies: 3
    Last Post: April 5th, 2011, 09:11 AM
  5. The difference between two Java libraries
    By ice in forum Java Theory & Questions
    Replies: 1
    Last Post: January 11th, 2011, 10:34 AM