element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Confused Caffeinated Canine: What's the deal with BoneScript, JavaScript & Java?
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fustini
  • Date Created: 10 Jan 2014 1:38 AM Date Created
  • Views 1494 views
  • Likes 1 like
  • Comments 12 comments
  • beaglebone_black
  • jvm
  • bonescript
  • javascript
  • bbb
  • BeagleBone
  • node.js
  • bb_black
  • java
Related
Recommended

Confused Caffeinated Canine: What's the deal with BoneScript, JavaScript & Java?

fustini
fustini
10 Jan 2014

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 ):

 

image VS image


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 image  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 image 

 

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

 

 

imageimage

What is BoneScript?

BoneScript is simply a JavaScript library that allows users to easily interface electronics with the BeagleBone:

 

BeagleBoard.org - BoneScript

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

http://twitter.com/pdp7

  • Sign in to reply

Top Comments

  • DAB
    DAB over 12 years ago +1
    Hi Drew, Nice overview. I used Java a number of years ago, but never got into the Java script. I might have to look into this capability for web control of devices. Maybe you could do a simple project…
  • shabaz
    shabaz over 12 years ago in reply to DAB +1
    I agree, very nice overview! I'm no expert on the history or these particular languages, so it was a very interesting post to read. To me Java always looked very similar to C++. The package paths thing…
  • e14 Contributor
    e14 Contributor over 12 years ago +1
    I'd take slight exception to "Java is a compiled language". Normally when we think of 'compiled' we're thinking of compiled to native machine code, like C. Interpreted would be Javascript, or for those…
  • shabaz
    shabaz over 12 years ago in reply to DAB

    I agree, very nice overview! I'm no expert on the history or these particular languages, so it was a very interesting post to read. To me Java always looked very similar to C++. The package paths thing and build tools are different though, so it can look a bit difficult to get into, for C and C++ users.

    I don't know Python so maybe I shouldn't comment, but at least with JavaScript the knowledge is reusable within HTML files too, so I think JavaScript would be a nice language to learn.

    Much of this project was in JavaScript on the BBB. The code was less than 90 lines to implement the entire interface (and that includes comment lines and blank padding lines.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 12 years ago

    Hi Drew,

     

    Nice overview.  I used Java a number of years ago, but never got into the Java script.

    I might have to look into this capability for web control of devices.

    Maybe you could do a simple project to help show us the way?

     

    Just a thought,

    DAB

     

    PS, Do you think java script or python is the better way to approach web control?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube