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 1492 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…
  • DAB
    DAB over 12 years ago in reply to fustini

    So is there a consensus or just an agreement to disagree?

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fustini
    fustini over 12 years ago in reply to e14 Contributor

    Yeah, I agree at that level of detail.  I guess I was thinking of it from the programmer's perspective where you'll get compile time errors with Java whereas Python will give you run-time errors since it is interpreted.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 12 years ago in reply to DAB

    DAB wrote:

     

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

    javascript for client side, in-browser scripting as it's the only thing universally supported. You're unlikely to be running python in your browser in place of javascript, and even if you are, nobody else will be.

    Until recently, with things like node.js, you wouldn't be using javascript on the server... node.js is trying to take advantage of the fact that lots of people already know client-side javascript and apply that pool of resource to server side.

     

    Drew said:

    Java was the trendy programming language in the 90s.

    I'd paraphrase that with "python is the trendy language today", nothing wrong with that, but the server side part of a web application doesn't have the same limitation as the browser in only supporting one language, you can write the server part in almost any language, C, C#, python, perl, php, pascal, ruby, lua etc.  So in a lot of ways it can be simpler to pick one you're already familiar with unless you have some fixed constraint (management decree?) to use (or not use) a particular language.

    For example, at my place of work php is specifically forbidden for web apps.

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

    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 of us who are a little older BASIC..  Java sits somewhere inbetween, it's both compiled to java byte code and interpreted when the JVM interprets the byte code at runtime. Yes, slight simplification as there's some Arm processors that can run java bytecode in hardware too, but generally most java code will run in a jvm of some sort.

    It's a subtle difference, and these things are often difficult for people to understand, but it's still an important one as with java you'll need to be aware of things like garbage collection happening behind the scenes.

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

    I'd actually recommend folks interested in web development start learning both Javascript and Python if possible.

     

    Javascript is essential for front-end web interfaces since it is the only language that runs in all web browsers.  The jQuery library is extremely popular for manipulating elements on web page.  The server-side application (aka backend) can now also be written in Javascript thanks to node.js (basically Javascript outside the bounds of the browser). 


    However, I think Python may be easier for most folks to program the backend application since there's over a decade of frameworks and tutorials (node.js is much younger).  For example, Django is a well-established Python framework to easily create a database-driven website.

     

    Codecademy is a good way to learn Javascript, jQuery and Python.

     

    Beyond webapps, Python is also an excellent language for many genres of software development.  I've noticed an increasing emphasis on folks using it for scientific computing and data analysis.

    • Cancel
    • Vote Up 0 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