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

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
ActiveState Debuts Open Source Business Suite
Salesforce Offers Visual App Builder
Codesion Steps Out From CVS's Shadow

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:


The Network for Technology Professionals

Search:

About Internet.com

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

webref The latest from WebReference.com Browse >
Use Web Caching to Make Your Web Site Faster · Creating an Online Shopping Cart Mechanism in PHP · Log JavaScript Errors Using an AJAX-driven Web Service
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Configuring Granular Settings for a Database Level Audit · The Perils of a Web 2.0 Transition on Your Business Processes · Facebook Redesigns Site —Again — Nears 400M Mark