2 Replies Latest reply: Apr 15, 2013 4:34 AM by gimbal2 RSS

    How to?  Java and Websites:  Java vs. Javascript

    999443
      Hello, I am new to Java. My roommate who is an ex-Java programmer says that Java and Javascript are virtually two different languages. He didn't give much in the way of distinction except to say that Javascript didn't support inheritance. I was wondering if someone could explain the difference to me. Also...a friend of mine wants to start a website store and I was wondering if all that would be needed to implement the site would be a knowledge of HTML and Java. So, I guess what I'm asking is if applets loaded to the server would facilitate the on-line store? Is there anything I am missing?

      Thank you for your time.
        • 1. Re: How to?  Java and Websites:  Java vs. Javascript
          Kayaman
          996440 wrote:
          My roommate who is an ex-Java programmer says that Java and Javascript are virtually two different languages.
          No, they're literally two different languages although with a similar syntax (but C and Java share similar syntax as well, so that doesn't really mean much).
          He didn't give much in the way of distinction except to say that Javascript didn't support inheritance.
          There's plenty of other differences. That's apples and oranges.
          Also...a friend of mine wants to start a website store and I was wondering if all that would be needed to implement the site would be a knowledge of HTML and Java.
          A good knowledge of both, then a knowledge of databases and some other things.
          So, I guess what I'm asking is if applets loaded to the server would facilitate the on-line store?
          No. Applets would be in no role here (and they're not very popular in other places anymore either).
          Is there anything I am missing?
          Well, based on your current knowledge and assumed skill, you won't be able to create a webshop. The best bet would be to get a free opensource software for that, but even then you'll need to know how to set up the server, the application server and possibly some database configuration.
          • 2. Re: How to?  Java and Websites:  Java vs. Javascript
            gimbal2
            996440 wrote:
            My roommate who is an ex-Java programmer says that Java and Javascript are virtually two different languages.
            One is a programming language and development platform (Java), the other is a scripting language to make a web browser do things and stuff it cannot do out of the box (javascript). So yeah, quite different.

            Nowadays the line is blurring because for some reason people also want Javascript to run on a server, which means it has been elevated from being a browser-scripting-tool into a full blown programming language. I wish people who have to use that lots of luck, since the language really was not designed for it.