Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Tamarin, Adobe open source the Flash player ?   Message List  
Reply | Forward Message #55465 of 149661 |
Language vs. DOM

At the risk of flogging the Tamarin topic to death... there seems to be quite a bit of conceptual confusion between a language and a DOM (document object model) that I'd like to try to clear up.
 
JavaScript 1.X originated in the Netscape browser, but the language itself isn't concerned with the Windows, Frames, Documents, Anchors, etc. that exist in a browser DOM. If you look at the SpiderMonkey implementation of JavaScript 1.5, it has none of these types of objects. If you look at how JavaScript 1.5 is used to extend and automate some Adobe applications like Dreamweaver, it has a completely different DOM, on top of the same "core" language.
 
The JavaScript language itself is about much more basic stuff... things like the following examples:
 
* Syntax: using the var keyword to define a variable; implementing inheritance by assigning to the .prototype property.
 
* Builtin data types: String, Number, Date, Array, RegExp, etc.
 
* Runtime behavior: any variable can contain any type of value at runtime; you can get or set any property on any object at runtime; if a property isn't found on an object, the language looks up that object's prototype chain for it.
 
These are language-level features, not DOM-level features, because they make sense and are useful with *any* DOM. Sometimes we say that features like these constitute the "core" of the JavaScript 1.5 language, although that implies that the DOM classes are part of the language and they really should be considered so.
 
Similarly, ActionScript 3 originated in Flash, but that language isn't concerned with the Sprites, TextFields, Bitmaps, etc. that exist in the Flash DOM. Instead, the essence of ActionScript 3 is about more basic things such as the following:
 
* Syntax: having compile-time type annotations; using the class keyword to define a class; using the private keyword to enforce encapsulation; using the package keyword to define a package.
 
* Builtin data types: having int and uint in additon to Number; having an XML type with powerful E4X operators.
 
* Runtime behavior: runtime type-checking; sealed classes; classes with true class inheritance rather than prototype-based inheritance; method closures; namespaces.
 
Again, these are language-level features of AS3, independent of the Flash DOM. You can call them the "core" of AS3 if you want. The flash.* classes are not part of this core.
 
The point of Mozilla's Tamarin project is that it will become an open-source implementation of a virtual machine (execution engine) for JavaScript 2 / ECMAScript 4, a still-in-the-process-of-being-defined *core* language, in the same way that Mozilla's SpiderMonkey project has been for the JavaScript 1.5 *core* language.
 
Tamarin, like SpiderMonkey, will have *no* DOM of its own. Developers can host any DOM on top of it, as appropriate for your application. For the Firefox browser, that will be the browser DOM of Windows, Documents, etc. For Flash, it will be the Flash DOM of Sprites, TextFields, etc.
 
- Gordon
 


Wed Nov 8, 2006 7:15 am

gsmithsf
Online Now Online Now
Send Email Send Email

Forward
Message #55465 of 149661 |
Expand Messages Author Sort by Date

Here's my understanding. [Caveat: I'm just a Flex engineer, and not directly involved in Tamarin.] Browsers currently support JavaScript 1.5. A future version,...
Gordon Smith
gsmithsf
Online Now Send Email
Nov 8, 2006
3:34 am

At the risk of flogging the Tamarin topic to death... there seems to be quite a bit of conceptual confusion between a language and a DOM (document object...
Gordon Smith
gsmithsf
Online Now Send Email
Nov 8, 2006
7:20 am

Godd stuff (again), Gordon. So, is it reasonable to assume that the Apollo team is also using Tamarin and adding DOMs on top of it to support the various...
ben.clinkinbeard
ben.clinkinb...
Offline Send Email
Nov 8, 2006
2:02 pm

Apollo will not add OS-specific classes to the Flash DOM; instead it will add OS-neutral classes such as Window, Menu, and File. But the Window class, for...
Gordon Smith
gsmithsf
Online Now Send Email
Nov 8, 2006
7:13 pm

... Right. What I meant was will it essentially add the OS DOMs next to the Flash DOM; I realize they wouldn't be mixed. But I guess what you're saying is that...
ben.clinkinbeard
ben.clinkinb...
Offline Send Email
Nov 8, 2006
9:19 pm

The classes that Apollo adds are actually in the standard flash.* package: for example, flash.display.Window. I think of them as Apollo extensions to the Flash...
Gordon Smith
gsmithsf
Online Now Send Email
Nov 9, 2006
1:05 am

... Once again, a great clear explanation - should hace had something like this in the press release / FAQ. -- Tom Chiverton Helping to professionally morph...
Tom Chiverton
tom.chiverton
Offline Send Email
Nov 8, 2006
9:36 am

Sort of... a better example may be creating your own Flex component, AVMPlus. This component depends on player.swc. The player.swc has some methods (like...
Brian Deitte
bdeitte
Offline Send Email
Nov 7, 2006
4:32 pm

If I get it, it means I'll be able to juggle both DOM objects and Flash objects from the *same* language ...? I say it's cool :D John ... From: Gordon Smith...
John Mazzocchi
john.mazzocchi@...
Send Email
Nov 8, 2006
12:25 am

I think that Gordon stated that you *will* still need the Flash Player plugin... the Flash-specific classes (like Sprite) will still live there. J ... From:...
John Mazzocchi
john.mazzocchi@...
Send Email
Nov 8, 2006
12:50 am

So will enhancements contributed by Mozilla to Tamarin feature in subsequent releases of the flash player? Or is this mainly an attempt to bring Javascript...
Bjorn Schultheiss
bjorn.schult...
Offline Send Email
Nov 8, 2006
1:26 am

Thanks JD. Answered alot. Regards, Bjorn Schultheiss Senior Flash Developer QDC Technologies From: flexcoders@yahoogroups.com...
Bjorn Schultheiss
bjorn.schult...
Offline Send Email
Nov 8, 2006
1:53 am

... Please forgive me if you've already got this info (the message threading is unclear to me right now), but yes, that's the anticipation, that improvements...
John Dowdell
jdowdell99999
Offline Send Email
Nov 8, 2006
8:05 pm

Bjorn As I understand it you'll still need the Flash plugin but will be able to use ActionScript for client side scripting on FireFox. Andrew ... -- ... Andrew...
Andrew Muller
daemon_rebel
Offline Send Email
Nov 8, 2006
12:50 am

Time out! Everybody go into their corner and read the FAQ and the previous commentary here before posting! ;-) ...
John Dowdell
jdowdell99999
Offline Send Email
Nov 8, 2006
1:11 am

Bjorn I'd guess that the answer is yes to both. Andrew ... -- ... Andrew Muller http://www.webqem.com...
Andrew Muller
daemon_rebel
Offline Send Email
Nov 8, 2006
1:48 am

Cool, smart move by Adobe! Regards, Bjorn Schultheiss From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Andrew Muller Sent:...
Bjorn Schultheiss
bjorn.schult...
Offline Send Email
Nov 8, 2006
2:22 am

Love that response, its gold! It really helped after a horrible night of hockey. Dimitrios Gianninas Optimal Payments Inc. ... From: flexcoders@yahoogroups.com...
Dimitrios Gianninas
angelone197555
Offline Send Email
Nov 9, 2006
3:50 am
 First  |  |  Next > Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help