Skip to content

AS3 is not Flex (right?)

2007 December 9
by Sven Busse

Juten Tach,
this is a First. I am writing a blog post in english. Don’t ask me why, i just wanted to. For the english speaking people, who are wondering, what “Juten Tach” means, it’s german, specifically, it is berlin slang for “good day”.

So, far, so good. Now to what i actually wanted to talk about. At my job, i am in the unfortunate situation of having to do way more AS2 projects than i would like to do and hadn’t have a chance to dive into AS3 as much as i wanted to. But in the last couple of weeks, i had some time and so i am making myself comfortable with the “not-so-new-anymore” language. And of course i like AS3 a lot. I don’t want to discuss everything here, of course i also miss private constructors, of course i love strong typing and runtime exceptions, blah, blah.

But there is something, that is confusing me at a very basic level. That is the mix of AS3 and Flex. When i dive into a new language (well, not completely new in terms of AS2->AS3, but you know what i mean), then i first start off by throwing everything away that is not part of the core language, because i want to know, how things work on a very low level. And what’s on the lowest possible level? The compiler. And there i already get confused. We have a “compc” and we have a “mxmlc”. So, i am not an idiot, i know, that you can compile Actionscript with the mxmlc, but why don’t we have an “as3c”? I believe, actionscript and mxml are two things, that should be clearly separated, because mxml is not part of the core language. it something on top of actionscript. So i would expect having an “as3c” and then having a mxmlc, that is using as3c internally.

I am missing a compiler, that knows nothing about the flex framework and nothing about mxml. A compiler, that gives me only the very basic functionality of compiling classes, embedding assets and creating frames on the main timeline. You can’t do this with mxmlc without having a handfull of Flex interfaces and classes in your resulting swf. Don’t get me wrong, in practice, it is not really a problem, those interfaces and classes are not very big, but i find it confusing, that i need something from the flex framework, only for embedding a graphic. I feel, that’s not the right way. If i want to do a pure AS3 project, then i do not expect anything of the flex framework being included in my project.

To be very true, i also actually don’t understand, why MXML is bound to the flex framework, because again, i feel, these two things do not have to be bound together. And i know, there was some alpha or beta for Flex2, where i could write my own MXML without using the flex framework, only with my own classes. That was so cool, but Macromedia (at that time) abandoned the feature later on.

I understand, that Macromedia and now Adobe is focussing quite strongly on the Flex framework and i also think, it makes sense, but i feel, there should be a little bit more consistency about what belongs to what and i believe, the flex framework and mxml do not (or should not) belong to the core of the flash plattform and thus, there should be a compiler reflecting that.

Feel free to comment on that.

5 Responses leave one →
  1. December 16, 2007

    Ein schöner Beitrag, den ich in großen Teilen sehr ähnlich sehe.
    Schade, dass Du jetzt auch in Englisch schreibst.

  2. Sven Busse permalink*
    December 20, 2007

    Ja, ein bisschen komisch finde ich es auch, aber man erreicht einfach mehr Leute damit.

  3. February 16, 2008

    Also ich finde es gut, dass du jetzt auch in English schreibst. ;)
    What I also would like to have, I don’t know if you are into this, are some tutorials, not the writings, but more like template files (.zipped projects) that you can load, learn and use. This I would love to have and I think I’m not the only one. The only resource I had on this are: http://download.macromedia.com/pub/documentation/en/flex/2/flex2_actionscript_examples.zip
    And also this was hard to find…

  4. February 17, 2008

    Correct me If I am wrong but I beleive MXML compiles as AS3.
    Don’t know why they named it MXMLC, since all it is is Action Script code.
    I also have some concerns about Adobe hiding the reasoning for some dubious decisions behind a vail of aggressive marketing. Truth is MXML is not as mature as advertised and promoted features don’t always deliver expected results. And then there is the SWC flash component kit…..why??? seems rediculous that code written in flash needs to be compiled into swc before injecting in flex. Seems it should be straight forward and both softwares should talk to each other.
    Truth is, Adobe has their financial concerns driving these decisions and I still find it hard to justify that i need to ask my boss to buy one flex and one flash licence, one for the powerfull code editor and the other for the library and timeline.
    Seems it should be all inclusive.
    Makes me wonder why flash shipped bundled with CS3, and there is no such thing as a flash-flex bundle.
    weird.

  5. Sven Busse permalink*
    February 17, 2008

    Hey Paul, thanks for the comment. You’re right, MXML is precompiled into actionscript classes. I cannot comment on mxml, since i have rarely used it in my projects yet. Concerning the flex component kit for Flash i think this is for convenience. I find it quite comfortable, that Flash generates a swc with everything included and ready to be used in flex projects. But you’re right, flash and flex still need tighter integration workflows. Let’s see, how Thermo will adress that – which would be the third software product, you have to ask your boss for :o )

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

*