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 1462 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…
  • Former Member
    Former Member 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…
  • olil123
    olil123 over 4 years ago

    This discussion is greatly helpful that helps to clear the core confusion of every beginner.

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

    Which language to use for web development? 

     

    Well, I think start with Javascript as it is a must (only way to control browser UI elements). 

     

    If you do require a server side program, then you can choose to keep using Javascript (using node.js) or you can learn another language that has web application frameworks.  I'd suggest Python; Flask framework for simple sites and Django for more complex, database-driven site.

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

    So the answer to my question is??

     

    DAB

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

    I don't think we're disagreeing.. Just the usual thing where once you get past the surface, then the devil is in the details.

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

    I guess I could be more precise by saying that since Java is statically typed (like C and C++) that a programmer will run into compile time errors often. As agrahambell points out, the Java compiler actually just creates bytecode class files instead of a native executable.

     

    This programming flow differs from Python which is dynamically typed.  You won't get errors until the interpreter encounters them as your program is running.

    • 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.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube