 |
HTML Help Please Search for the answer to your question before asking it! Thanks.
|
| View previous topic :: View next topic |
| Author |
Message |
gkp1988
Joined: 07 Jan 2009
Posts: 11
|
| Posted: Thu Jan 08, 2009 12:42 am JavaScript vs. Java |
|
|
Although the names are much alike, JavaScript is primarily a scripting language for use within HTML pages, while Java is a real programming language that does quite different things from JavaScript. In addition Java is much harder to learn. It was developed by Sun for use in pretty much anything that needs some computing power.
JavaScript was developed by Brendan Eich, then working at Netscape, as a client side scripting language (even though there's no fundamental reason why it can't be used in a server side environment).
Originally the language was called Live Script, but when it was about to be released Java had become immensely popular (and slightly hypey). At the last possible moment Netscape changed the name of its scripting language to “JavaScript”. This was done purely for marketing reasons. Worse, Eich was ordered to "make it look like Java". This has given rise to the idea that JavaScript is a "dumbed-down" version of Java. Unfortunately there's not the slightest shred of truth in this story.
Java and JavaScript both descend from C and C++, but the languages (or rather, their ancestors) have gone in quite different directions. You can see them as distantly related cousins. Both are object oriented (though this is less important in JavaScript than in many other languages) and they share some syntax, but the differences are more important than the similarities.
If you are a C++ or Java programmer you will be surprised by some of JavaScript’s features. Since I don’t have any previous programming experience, the differences are not described on this site. The best you can do is buy David Flanagan, “JavaScript, the Definitive Guide”, 5th edition, O’Reilly, 2006. In this book the differences between C++/Java and JavaScript are clearly explained. I co–edited a few chapters of this book. |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 4288
Location: MS
|
| Posted: Thu Jan 08, 2009 7:08 am |
|
|
| Please note the purpose of this section of the forum: Quote: Client-side (i.e. browser) code to create a popup, menu, or other feature. It is for problems with JavaScript or questions related to JavaScript. Not for JavaScript comparisons/tutorials on JavaScripts unless it relates to helping someone with their JavaScript post. |
|
|
| |
|
|
|
Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group
|