spacer
Yehuda Shiran July 18, 2000
SpiderMonkey and Rhino
Tips: July 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

When we talk about JavaScript, we usually refer to the JavaScript interpreter that is provided with Internet Explorer and Netscape Navigator. But what if we want to use JavaScript scripts from within a stand-alone application written in C or Java? Netscape developed the concept of JavaScript engine. This is a piece of compiled code that knows how to interprets JavaScript. It is a shared resource, implemented differently for each platform. On Windows, for example, it is a DLL, while on Unix it is a shared library. You link your application with it and then embed JavaScript engine application programming interface (API) calls in your application. The JavaScript engine's API provides functions of the following types:

  • Data Type Manipulation

  • Run Time Control

  • Class and Object Creation and Maintenance

  • Function and Script Execution

  • String Handling

  • Error Handling

  • Security Control

  • Debugging Support

Before you can make any JS calls, you must create and initialize the JS engine with a call to JS_NewRuntime function.

Netscape developed two dialects of the JavaScript engine: a C-based engine (called SpiderMonkey) and a Java-based engine (called Rhino). Obviously, you would link your C applications with SpiderMonkey and your Java applications with Rhino.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business