Wednesday, April 02, 2008

JavaScript vs. ActionScript

Today on the Google LiveCycle Developers list, a message came across which requires some additional clarification. The message claimed the following:

Hello all,
I don't know if this has been discussed before but thought I'd bring
it up. The JavaScript in LiveCycle isn't ECMA script it's actually
Action script like with Flash.
While the claim is errant, it does deserve some attention to discuss the differences. LiveCycle ES itself is a server product and is Java. If referring to
the LiveCycle clients, there are two main types of clients that can be used
with LiveCycle, although there are no limits as LiveCycle ES is a service bus which facilitates the consumption of services and does not constrain clients use of the services in true SOA manner (note: any service policies still must be observed). The two most common types of clients are Flex/AIR clients and Acrobat/Reader.

Acrobat and Reader implement a virtual machine based on JavaScript version
1.5 of ISO-16262 (formerly known as ECMAScript), JavaScript in Adobe®
Acrobat® software implements objects, methods, and properties that enable
you to manipulate PDF files, produce database-driven PDF files, modify the
appearance of PDF files, and much more. You can tie Acrobat JavaScript code
to a specific PDF document, a page, field, or button within that document,
or a field or button within the PDF file, and even to a user action as you
an with HTML pages. This is fully documented in the supporting
documentation. See:
http://www.adobe.com/devnet/acrobat/pdfs/AcroJSGuide.pdf

Flex and AIR applications are in fact compiled into SWF's (commonly known as
Flash). These do implement the Actionscript Virtual Machine based on
ECMAScript. The current version was added in Flash Player 9 as ActionScript
3.0 with the advent of a new virtual machine, called AVM2 (ActionScript
Virtual Machine 2), which coexists with the previous AVM1 needed to support
legacy content. Although a bit different, it is very close to being ECMA
262 compliant.

ActionScript is run inside the Tamarin Virtual Machine. It is a just in time compiler intended to implement the fourth edition of the ECMAScript standard, commonly referred to as JavaScript 2. Tamarin was initially developed by Adobe Systems for its ActionScript Virtual Machine (AVM) used in Flash. The code was donated to the Mozilla project on November 7, 2006. The contributed code is tri-licensed under the GPL, LGPL, and MPL and will continue to be developed in Mozilla CVS, as the rest of Mozilla source code.

The contributed code is approximately 135,000 lines of code making it the largest single donation of code to Mozilla project besides Netscape itself. Tamarin will be included in future builds of Mozilla and by default, FireFox. There is a separate project to integrate Tamarin and SpiderMonkey is called ActionMonkey. Tamarin will also continue to be used in the future versions of Flash.

Adobe wrote LiveCycle before acquiring/merging with Macromedia, there was
no ActionScript support in any product to my knowledge.

7 comments:

  1. LiveCycle Designer uses JavaScript, and the Script service uses Bean Shell, which is basically just plain Java.

    ReplyDelete
  2. Greetings!!I will bookmark for my son this site..

    ReplyDelete
  3. Thanks, for this information and news it was very useful to me

    ReplyDelete
  4. LiveCycle Designer uses JavaScript, and the Script

    ReplyDelete
  5. Greetings!!I will bookmark for my son this site..

    ReplyDelete
  6. Wowww...This is what i need..thanks...

    ReplyDelete
  7. LiveCycle Designer uses JavaScript..thanks

    ReplyDelete

Do not spam this blog! Google and Yahoo DO NOT follow comment links for SEO. If you post an unrelated link advertising a company or service, you will be reported immediately for spam and your link deleted within 30 minutes. If you want to sponsor a post, please let us know by reaching out to duane dot nickull at gmail dot com.