15 August 2008

ActionScript and ECMAScript 3.1/4 - Inter-op is the Key

Written by Richard Leggett ( Contact the author of this post )
Published on August 15th, 2008 @ 09:50:49 am, using 490 words, 978 views
Categories: Flash, JavaScript

Like many other Flash devs I’ve been following the discussions surrounding the ECMAScript 4 decisions and the Harmony project quite closely. There are a few bloggers out there that appear to be stating that ActionScript will become divorced from the standards. To be honest only Adobe can decide that, but either way, that’s only half the story. In particular, it does not mean that ActionScript will not be able to inter-op, and that’s key…

Here’s a Google Spreadsheet containing the votes by Adobe, Mozilla, Google, Apple and most controversially Microsoft regarding the various features of ECMAScript 4, such as the notion of packages, new operators, and so on. So clearly everyone not in agreement, everyone with their own valid opinions and vested interests. And you can see already that there are rejections in the feature set of ECMA4 that AS3 has already implemented.

So does ActionScript 4 have to take a side step (and maybe a step backwards) to get in line? It doesn’t really matter. Whilst it’s nice to be able to jump between languages without having to change your mindset at all, it’s not a big deal. What is essential is that you can call functions and pass objects between those two VMs, or indeed, share the VM. And forgive me if I simply don’t understand enough about how this sort of thing works (very likely), but this is still possible.

Indeed right now we can very easily inter-op between the very old JavaScript 1.5 and ActionScript 3 via ExternalInterface. Yes there are limitations, but both environments (Flash and HTML) have many unique features and extensions that simply don’t cross the boundary very well. For example the HTML DOM (having said that you can still control it, see AIR), or in the case of Flash, cutting edge features like 3D, Adobe Pixel Bender (Hydra), or even simple Bitmap effects. Now I know these are not language features at all, but they are part and parcel with how we as developers use our language every day, and so there is no harm at all in having extensions that are unique to one environment, as long as they do not conflict with a similar feature of another. One example here is packages and namespaces… AS3 has them, it doesn’t look like JS will get them, but so what, as long as the code is similar enough to understand, porting code can be automated, and at the very least inter-op can still be easily achieved the fact that they differ is small fry.

Personally I would say the challenge now for Adobe will be to continue to develop ActionScript into a feature-rich language, whilst making sure it doesn’t begin to conflict with the ECMAScript standard it runs in parallel to. The nature of JavaScript following the committee-led ECMAScript standard means this is going to happen again and again, the process is simply too slow. Adobe (and now Microsoft) have set a new pace for the web.

Comments, Pingbacks:

Comment from: radekg
Votes by Microsoft? All I can see is MS enumerated there but looks like MS wan't voting there. Is that controversial?
PermalinkPermalink 15/08/08 @ 11:29
Comment from: Richard Leggett [Member] Email
I think this post might shed some light on the blank column:

http://www.mikechambers.com/blog/2007/11/01/microsoft-trying-to-derail-ecmascript-4/
PermalinkPermalink 15/08/08 @ 11:39
Comment from: Danny Miller Email
I don't know, I think it's important that the web have a standard. That's the natural progression, just because in 2008 people don't think that namespaces and packages are applicable doesn't mean by 2009/2010, when the spec was scheduled to finish and be shipped in products, that these features won't be useful. We're looking for a standard that will last the web for years and years. Javascript, Actionscript, etc need to use the same principals and code. It'll make learning the languages easier and ultimately lead to better web based products in the future.
PermalinkPermalink 15/08/08 @ 19:02
Comment from: Sean McSharry Email
I agree with Rich on this one. Whilst moving towards a common standard is the right thing to do, it should not be at the cost of unique or existing advanced or helpful functionality. Look what they did to the Singleton by preventing private constructors in order to adhere to a standard. I really don't believe we should have to take a blanket step backwards to move some things forwards.
PermalinkPermalink 18/08/08 @ 12:12
Comment from: Russ Email
Looks like Apple was the big stinker on this vote, not surprising. All this talk of Microsoft being the bad guy, I think Apple is probably more of a threat.
PermalinkPermalink 18/08/08 @ 17:59

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

About

Richard Leggett is an RIA and Web Developer, co-founder of Ubrae Ltd. He is co-author of Foundation Flash Applications for Mobile Devices (Friends of ED), an Adobe Community Expert and speaker at industry conferences and user groups.



November 2008
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Categories

Miscellany

XML Feeds

Information

Contact the admin  /   b2evo template by Two18 Media