Howdy - a novice looking at BoneScript for BeagleBone today asked me how JavaScript and Java were related. Here's my response (please let me know in the comments if I'm missing any points ):
Java vs. JavaScript
Java and JavaScript are different programming languages.
The unfortunate history of JavaScript's name is that Netscape (back in the 90s) called the scripting language for the Netscape Navigator browser JavaScript because Java was the trendy programming language in the 90s. They are really only similar in name and quite different programming languages. In fact, JavaScript was originally called LiveScript until Netscape marketing got the "bright" idea to rename it.
Nowadays, JavaScript is a very widely used scripting language beyond just the web browser and of course, different companies, call it different names
Adobe calls it ActionScript for Flash. Microsoft for a long time called it JScript in Internet Explorer. It was eventually standardized by European standards org (ECMA), so the generic name for JavaScript is ECMAScript (http://en.wikipedia.org/wiki/ECMAScript).
Java on the other hand came out of the Sun Microsystems in the 90s as a slimmed down version of C++ to create software for set-top cable boxes (the "green" project). In fact, it was originally called Oak after the lovely tree outside the creators office. Then Netscape added the ability to run Java programs in Netscape Navigator browser called Java applets: http://en.wikipedia.org/wiki/Java_applet
Java is a compiled language which is pretty rigid in its structure. It's big features are that it is object oriented and that Java programs run on almost every operating system without modification (thanks to Java Virtual Machine or JVM).
Javascript is an interpreted languge (aka scripting language) which is more friendly to beginners in my opinion so long as you stick to the good parts (http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742). Khan Academy choose it to teach Computer Science. JavaScript is a bit of a hybrid language mixing Object-Oriented, Procedural and Functional programming models. A big advantage is all web browsers can run JavaScript so it is the universal programming language of our times (for example, Google's GMail is mostly a JavaScript application).
Anyways.... maybe I indulged my love of computer history a bit much
I recommend learning JavaScript (aka JS) if you have the chance. Good ways to learn:
- Codecademy: http://www.codecademy.com/tracks/javascript
- Khan Academy: https://www.khanacademy.org/c
What is BoneScript?
BoneScript is simply a JavaScript library that allows users to easily interface electronics with the BeagleBone:
BoneScript is a Node.js* library specifically optimized for the Beagle family and featuring familiar Arduino function calls, exported to the browser. Get started exploring the BoneScript Library to discover the great simplicity that is made possible by utilizing Linux.
*note: Node.js itself is essentially a set of JavaScript libraries which allow one to write general purpose computer programs with JavaScript and run them on outside the web browser (like a regular computer program)
Cheers,
Drew




Top Comments