Archive for the Category: Flex

Do you really have to give up standards for simplicity?

Yes, absolutely, when it makes sense to do so.

I'm amazed how humans seek approval of an authority and feel comfortable when they have it.

Lets take W3C recommendations. A committee decides on something and many people think of them as rules, laws (kind of like god made), they do not try to understand the reasoning behind them, they just accept them as they are.

I have blogged about this before. According to my criteria many W3C 'standards' are totally wrong, and to my surprise it's no secret how they do things and why. Still, many people don't want to think one step further. I believe many will have agreed with me, if they really gave a minute of thought on the subject.

(BTW, Scott Adams' Power of Ridiculous Reasons is a good read).

What are standards? Why are the standards as they are? Why is something a standard?

QWERTY keyboard layout was designed to slow the typer (at the time of mechanical typewriters, to avoid jams). It's the standard layout many of us still use, though we will like to type faster and there's no jamming issue with our current computer keyboards.

If faster typing is your goal, when you hit the QWERTY layout barrier, you should question the standard. What was the reasoning, did it ever make sense, does it make sense now?

I can agree to disagree – afterall, we are all different, we can't agree on everything. But defending an argument by mentioning 'standards' really doesn't make an impression on me.

I value simplicity. If some standard is making things unnecessarily complicated (when there's a clear simple choice with no drawbacks), I will question the standard first rather than give up simplicity.

Of course, I'm not saying that simple is always better:

"Make everything as simple as possible, but not simpler." -  Albert Einstein

You have to recognize it when it is better, and not simpler than necessary.

Einstein also said:

"Any fool can make things bigger, more complex, and
more violent. It takes a touch of genius — and a lot of courage — to
move in the opposite direction."

And while at it, the following is one of my favorite quotations, from Einstein:

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."

[This post is not an answer to another post - hence no link. It's just that a sentence in a blog post inspired me to write about this. Still let me state what I think about namespaces vs. prefixes again:

- IMO Namespaces do not solve any real problem. They solve artificial problems.

- There's something that looks elegant and cool about namespaces, just like some furniture that looks great but has awful functionality. Deceiving, I say. Must think one step further.

- Using a prefix is inherently simpler and better than using namespaces. (Assume there was no namespace type. If a simple prefix solves the problem, you don't need namespaces at all).

- As I don't think namespaces are any good, and should not ideally be in a language as a type, even without any context, if one solution makes use of namespaces and the other does not. I'd say that the other solution is better.

- When you need to use a prefix, you just do it. There is no problem to write home about. Even if you think there is a problem, it exists only for a tiny moment until you realize you can use a prefix. Prefixes are not features of a language, they are just naming conventions. What do you do when you realize you have redefined a local variable named "a" a second time, and the compiler is not happy about it? Define namespaces to fix the name collision, or, just rename the new variable "a" to "b"?

- I value backwards compatibility very much (maybe more than most). But you don't have to be consistent if you are moving forward. (Take AS1/2 and AS3. Flash player runs AS1/2, but AS3 is not consistent with AS1/2).]

Also posted in Flash 3 Comments

I don’t believe in NameSpaces

I've been professionally programming for more than 20 years [1] and I've never needed to use a namespace.

I do know what a Namespace is. I think I shouldn't have.

Rarely, when the compiler cannot figure out what variable or function I'm referring to, it just signals an error and I fix this by writing the qualified name. That's all there is and there should be to it.

Of course namespaces can be there as leaked abstractions of implementation details. Ideally, a programmer should not know about them [2].

Why? Because, they don't help much, don't have much use, They are extra things to learn and complicate things unnecessarily. (Objects as abstractions actually help programming, Namespaces don't). (And there are XML namespaces, which I don't like in a different way).

Namespaces in a programming language solve an artificial problem and they create a bigger problem than they solve.

Still you may like them. But if that's the case, can you tell me how these fit in a scripting language that doesn't have a pointer type or memory management (by user)?

The first time I heard about 'Advanced' data structures called linked lists(!), I was surprised but later this made sense [3].

ActionScript should be simple. A namespace soup complicates things without much, if any, benefit in return. I don't think any language needs a spelled out Namespace type but scripting languages more so [4].

But we do have namespaces in AS3. I'm not proposing that they should be removed (Backwards compatibility is important). They just should not be made to look like a fundamental property of the language. Someone who has never heard of namespaces should be able to program in AS with no side effects caused by language design. This will make AS better than the rest [5].

Luckily, currently the situation is not hopeless, you can do without namespaces most of the time. What I'm afraid is the future directions.

I call namespaces  the unnecessary evil

[1] Actually 21. I've programmed in Basic, Z80 and 80×86 assembly, C, C++, Delphi Pascal and briefly in Cobol, Fortran, Lisp and Prolog. I won't bother listing numerous scripting languages.

[2] C++ has many features that many programmers don't know and care about. You can do without them and this is totally OK with me.

[3] Linked lists are simple data structures, not advanced.

[4] In AS3 there are some features that make use of namespaces which IMHO should have been implemented in other ways.

[5] Computer language design is my hobby. It's one of the two subjects I feel like I'm truly qualified to talk about. Of course, you are free to disagree. But my thoughts on language design has many years of background and it's unlikely that I will change my opinion on namespaces.

Also posted in Flash 8 Comments

What’s wrong with the Flash Platform?

When Microsoft bought FoxPro, leading database app of the day, in 1992, I remember, an intriguing question among programming community and geeks was whether MS will use the Watcom compiler, which was used for building FoxPro to that day, a compiler which was state of art at the time and better, or, use their own inferior MS compiler to build the next version of FoxPro… I never followed-up, and don't know the answer, still the question remains as a fundamental one. (FoxPro was later renamed as Visual FoxPro and died in 2007 at version 9).

A platform needs to be taken seriously. For quite some time Flash (whatever you meant by it) was seen as a toy for creating animations for the web, including the ones that made you look for the 'skip into' link and really annoying advertisements that hid content. Most of the time this was true.

Things improved in time, but it's always hard to change initial perceptions.

I'm now skipping pages of info that may bring the reader up to date with Flash history, for the sake of coming to my point.

I may be seeing what is not there… But I see the Flash Platform as the main platform of the future: OS-wise cross-platform, on both desktop and web, and on other devices… "Flash Platform" is not "Flash" (whatever you understand by it). You can't consider something as a platform just because you can write RIAs for it or it has a desktop component, or just because you have a few different editions. It's bigger than that. It has to be…

Java started with the promise of making apps that you write once and run everywhere. As I see it, it failed to achieve this. I see Flash replacing Java, achieving this initial goal. I see Java (not JavaFX) as a rival to Flash as a platform…

The developer types who were expected to jump into Flash train with Flex were mainly Java developers, as Java is also a scripting language, just like actionscript.

How do you convince a Java developer that Flash (platform) is better? Will you have any answer when he reminds you that 'recommended professional developer tool', now named 'Flash Builder', is just a plug-in for Eclipse [1], which is build primarily in Java? Will you have an answer when he mentions that the AS3 compiler is also build in Java?

If I were a Java developer, at best I'd say Flash might be better for 'animation and stuff' only. If Flash Platform relies on Java, then it's inferior to Java, as a platform, no need for further discussion.

I don't think embracing Java is an option for Flash Platform. Flash will be the platform of choice and the better one, or it will be a toy animation platform (with some scripting capability). I don't consider being open source or not coming from MS as valid reasons for embracing Java. Also I cannot picture a stable co-existence, with similar usage ratios, being 'second best' is not an option I will be content with.

With AS3 and JIT, as I had written before, I was hoping the AS3 compiler would be in AS3… AFAIK, this has not happened yet. For this reason, professionally as a programmer, I don't consider actionscript as mature. If actionscript is a serious language (even though it's a scripting language), it has to have a compiler written in actionscript (this is my idea for maturity, you are welcome to disagree).

As I see it, for success, Flash Platform should get rid of any reliance on rival platforms (Java, .Net etc.) as soon as possible. (3rd party tools are OK, after all, they are additional tools. I think a platform should provide at least basic building tools, sufficiently advanced, that does not rely on rival platforms. [As soon as possible may mean years - but I believe this should be the agreed goal]).

Silverlight is not a rival to Flash Platform, .Net is. Silverlight is the toy animation [2] part of (web part of) .Net Platform. I believe Flash, as a platform, should have bigger goals than beating that.

People ridiculed Microsoft, when they used Flash rather than SilverLight for promoting some stuff. I'm surprised I'm not seeing anyone mentioning Java use with Flash. Is Java a better programming platform, and Flash Platform is really only a sub-platform for animation (and maybe minor RIA stuff)? Is this the planned and expected future role for the Flash Platform?

Is it because it's so obvious that Flash will ditch Java use when the time comes, that nobody mentions it? or are my expectations for the Flash Platform unrealistically high? I wonder.

I can write more, but I think I made my point.

Watcom C compiler went to Open Source heaven in 2000. Borland C++, which was considered better than Microsoft Visual C++ compiler (MSVC) by many in its time, died even before Watcom. Whatever route MS took then, when building next FoxPro version in 1992 doesn't really matter now. Today, MSVC is alive as it can be at version 10 (as preview, to be released)…

(And I now think blogging more is sure to make me unpopular, so I will stop).

[1] I don't mean to show disrespect to "Flex Builder" developers (both actual developers and people using it). Sorry if I sounded rude,  it was to make my point clear. I think "Flex Builder" should be a native or Flash application, in principle. I don't 'demand' it to be done 'now', but I believe this is something everybody involved should know and agree and expect as a realistic future goal: A better IDE than Eclipse in every way, written in actionscript, running way better than any Java app can run, in Flash VM… (Same applies for the AS compiler).

[2] Obviously SilverLight (or Flash) is more than just a 'toy for animation'. The usage is for making my point, hopefully, more clear.

Also posted in Flash Tagged 8 Comments

Why I don’t think Flash Builder is a good name…

A man applies to court to legally change his name. Judge asks "What's your current name?", man replies "John Shit". Judge says "I see why you want the change. What would you like your new name to be?". Man says "James"…

I admit there was some confusion because "Flex Builder" could actually build more than Flex Framework based work etc. I admit another name be it "Flash Builder" or "XYZ" will help cut this confusion.

But the name "Flash" already means many things to many different people. Confusion around the word "Flash" is probably more deep than any Flex related confusion.

What is Flash? To me it's still the Flash authoring tool. For some it's the Flash Player. For too many people it's 'a SWF file'. Does anyone take 'Flash' as 'Flash Platform'? I don't think more than a few if any, you need to explicitly refer to it as 'Flash Platform'.

So is 'Flash' a 'platform'? Has 'Flash' become a 'platform'? I'd say 'yes' but not in 'words'. Confusion rules. And we are to welcome another member.

There are some catchy words, sometimes software companies use for all their applications, like 'Smart', 'Cute', 'Easy' etc. Then when they release any application they will use the cute name first, as a trade mark, like Smart Editor, Smart DVD Ripper, Smart Doc Shredder… I don't dislike the practice, it's totally fine and we can even do that in the future (if we can find a name not taken). I think this is what 'Flash' is becoming. Not a platform but a cute name, a buzz word you find on (hopefully only) Flash related Adobe applications.

I don't want see the word 'Flash' like this. I want it to refer to the platform.

If you refer to a "SWF file" as "Flash", then the word "Flash" can never mean the platform. This is something I strongly believe. Do you think someone when referring to a "SWF file" as a "Flash file" will ever even unconsciously think he is actually referring to a "Flash Platform file"? Do you ever think of a "GIF platform" when you refer to a GIF file?

'Flash Builder' is a better name than 'Flex Builder' in a sense. But if 'Flash Builder' is building Flash, then Flash is the SWF file, not the platform.

Does anyone remember how Microsoft guidelines urged developers for calling their applications as "XXX for Windows" and not as "Windows XXX"? (I assume they still do). Is it "MS Windows Word" or "MS Word for Windows"? Obviously when Windows was new this made more sense, it was totally normal someone would want to include the name "Windows" in their application name as "Windows XXX"… I hope you get my point.

If 'Flash' was a platform, then the new name should have been 'Builder for Flash', not 'Flash Builder' *.

This would have also caused confusion. Heck, it's still creating confusion if SWF refers to 'Shockwave Flash' or not. Unfortunately, we have to accept that 'some' confusion is here to stay. With correct moves you make it less, with wrong ones you create more.

There are levels of confusion. To the clueless, a guitar (with 6 strings) can look like the same as a bass guitar (with 4 strings) (I have actually seen this happen more than once). You can either call all guitars as 'bass guitars' which will, on the surface look like it has cut the confusion (but will create more in the future). Or you can accept that level of confusion as a fact of life, that cannot be fixed for the clueless at that level (At least you should avoid a move that will create more confusion than it fixes)…

I want to finish with a positive note. It's good that, myself included, now not many people think it's still necessary to avoid the word 'Flash' to make 'Flex, Flex Builder' taken seriously (by people with Java background etc. who may think Flash is 'animation with a skip intro button').

Another positive note: It seems most people, many fellow bloggers I respect, don't agree with me on this one. This means probably I'm wrong and this is a good thing because Adobe won't change the naming policy because I don't agree, Flash Builder name is here to stay. Hopefully, I'm wrong and the name change will be better for the Flash platform.

* I don't think 'Builder for Flash' is a better name, or 'for Flash' use will be better. My point is that you shouldn't use the 'platform' name as a prefix to applications that create content for that platform. If I were to make the decision, probably the next version of Flex Builder would be called 'Adobe RedLight'…

Also posted in Flash Tagged , , , 6 Comments

A Flash of Doom: An Alchemy That Works!

Awesome! One hundred percent pure, old-fashioned, home-grown, plain awesome…

Adobe released Alchemy preview version on Labs some days ago. I haven’t even yet had the chance to download it. AFAIK, it lets you compile C/C++ code to AS3 for Flash Player 10. It’s bound to have some limitations (but not much apparently), and I don’t want to talk about it more until I know more. (Update: You can get more info at Branden Hall’s post titled Understanding Adobe Alchemy).

Then I saw the post titled Play Doom Online on FlashMagazine. There, there was a link to port of Doom to Flash. (I must say that I don’t agree with Jens that Doom created the FPS genre of 3D games. I think it was Wolfenstein 3D). Anyway, at first it didn’t work. I do all my browsing in Virtual PC and in there the virtual graphics card has even less 3D support (actually, none I think) than my main graphics card which I choose as the cheapest card available as I don’t play any 3D games and don’t need any 3D acceleration at all. So I suspected if that was an issue. I also tried IE6 but couldn’t get past the first screen.

24 hours later, I tried again with IE6, failed, then with Firefox, finally, Doom appeared before my eyes. There’s no music but it was totally playable even in Virtual PC, on a real computer which can be considered quite ordinary today.

Doom

Of course, it was not the 3D that impressed me, I have seen my share of impressive 3D stuff done in Flash. I have also seen very successful, though I must admit not many, near-exact game ports to actionscript, AS2 actually. The magic here is Alchemy, what the author, Mike Welsh, wrote: ‘Recompiled from the original source by Mike, using Alchemy!’ (Of course, I think Mike, as the alchemist, did a splendid job here, kudos to him!).

This is big! I’d say Alchemy will be a key step in Flash Platforms evolution. Great work Adobe!

For Alchemy some new bytecode instructions were introduced to AVM2 (see Scott Petersen slides PDF). I’m not sure what this will mean for ASV. If we will be dealing with a full featured optimizing C/C++ compiler, decompiling back to C/C++ will be really hard work for us, that I can say…

[Update (2010): See http://asvguy.com/2010/05/officially-announcing-azoth.html for free Windows Alchemy Opcodes Injector]

Also posted in Flash Tagged , 2 Comments

Flash CS3: Guilty as Charged

Colin Moock‘s article at Inside RIA, titled ‘The Charges Against ActionScript 3.0‘ is a must read, especially if you are a Flash developer still trying to migrate to AS3 and find it hard.

The article is really about shortcomings of Flash CS3, rather than AS3, and it has good tips for AS1/AS2 developers.

I agree with 99.9% of what Colin says there.

AS3 made Flash harder to learn. If you are not a Java programmer, I think you’ll agree.

I personally don’t like Java or ECMAScript, not any more than I like XML. But sometimes you have no choice and all in all, AS3 is a fine scripting language, clearly better than AS2 but with a steeper learning curve, for which most Flash developers don’t have the time for.

[I had very high hopes for AS3 until I saw the compiler done in Java. I hoped it would be done in AS3. I still hope there will be an AS3 compiler written in AS3 soon, all Java will be ditched from Flash platform and people will call AS3 the better language and Flash as the platform that replaced Java, accomplished what Java never was able to do (write once, run everywhere, for starters)].

With AS3, Flash got closer to Java developer types, but became harder for the Flash developer types. My understanding was that Flex would handle the Java developer types and RIA end, Flash (the authoring tool) would stay as easy as before. This didn’t happen.

One commenter says:

‘:) this was the same thing we talk to colleagues about the changes to
AS3. The think we do is to make some wrapper object witch gives me some
of the good old functionality from AS2.’

Colin’s article has a getURL replacement AS3 function, which I will start using immediately. Colin says on()/onClipEvent() functions should be back (in an improved form) and Flash should convert to AS3 when exporting. I think that should be the way to go. Flash CS3 already converts timeline code to a class behind the scenes, why not exploit this approach more? Flash, with AS3, should be as easy to use as before, as much as possible. Otherwise lots of Flash developers will be out. (Sure, there may be other, easier to use tools but if Flash authoring tool loses ground, it can’t be good).

Another commenter says:

‘I think most of us who do AS3 40hrs a week for a living just wrote our own libraries to make this stuff easy again.’

‘I don’t want to switch to Flex.  If I have to go to flex why not just use silverlight.’

Also posted in Flash Comments Off

SWF format is now really open…

SWF format has been open since version 3, 1998. It was again May as far I can remember. Now 10 years later, restrictions on using the format is removed, effective as of today, May 1, 2008.

Previous license restrictions were for creating SWF players, creating SWF files was never restricted. I think this was a good idea at the time, nobody wanted multiple incompatible SWF/Flash Players around, also considering the fact that SWF version 3 even had a Java edition player. Now the technology is mature at version 9 – and as I’ve said 10 years has passed. I personally don’t see any danger of multiple browser players gaining ground.

(Another good consequence of this is that you no longer need Adobe Reader to view the SWF specs, Foxit reader now works just fine).

The news came with Adobe Open Screen Project announcement.

Here are relevant links:
SWF Specs at Adobe SWF Tech Center
FLV/F4V Specs at Adobe FLV Tech Center
AMF Specs
ActionScript VM2 Overview (AS3 specs) (PDF)

[F4V is the file extension for HD Flash video, mp4. There's also F4P, F4A and F4B. For playing F4V, Flash player 9.0.115.0 (Flash Player 9 update 3 - MovieStar- released on December 4, 2007) or later is required. Current version of the Player is 9.0.124.0, released on April 8, 2008]

Also posted in Flash Comments Off

Old news: AIR Beta2, Flex3 Beta2, AMP prerelease and Flash Lite 3

It all happened on October 1st and I kind of ignored them because of all cool news coming from Adobe MAX.

Flash Lite 3 is out and it supports FLV video along with most SWF 8 content. Flash Lite is Flash for mobile devices, phones etc. and video support means you’ll be able to enjoy YouTube with your cell phone (of course your phone has to have FL3).

AIR public beta 2 finally supports Windows 2000 and is overall improved. I’m yet to try it. There’s also Flash CS3 update for AIR.

Matt Chotin  has the what’s new article for Flex 3, and also covers public beta 2. Ted Patrick announced price decrease for Flex Builder 3, SDK pricing won’t be changing because it’s already free. All I can say about pricing is this: Regional pricing sucks! Thank god ‘free’ doesn’t translate to a low price outside USA. As always, Ted’s blog is the place to find Flex news and info.

Adobe Media Player (AMP) is the long waited official Adobe FLV Player. It seems it’s more than that with catalogs, favorite shows etc. and offering content protection to content publishers. Requires latest AIR beta2 and I’m yet to install it. So I’ll post my impressions later.

There’s also Flex Builder for Linux alpha, released on October 2nd. It’s definitely good to see Linux support though I’m not actively using Linux but I do plan in the future, especially if Microsoft fails to deliver a decent version of Windows, something on par with XP, nothing like their latest big flop Vista.

And then there’s Adobe Inspire Experience design site alpha, you may want to check it out.

Also posted in Central-Apollo-AIR, Flash Comments Off

Flash 10 and Quake in Flash

Peter Elst has a post titled Adobe MAX Chicago – Sneak Peeks and you can’t afford to miss the videos about next version of Flash and C/C++ to AS3 conversion.

Next version of Flash will have a better ‘stage’ where you can have your video live and you’ll need to test your movie less. You’ve got to see the new tweens, they will become very capable and easy to use. Lastly demonstrated is kinetics – bones built-in to Flash, too cool I won’t even attempt to describe here.

C/C++ to AS3 conversion is really cool too. Applications are endless. You can have Ruby or PHP interpreter converted AS3 and actually run PHP code then. You find a sample C++ code, and you can use it in your SWF easily, there won’t be language barriers. Demo is impressive with Quake code converted to AS3. This is really something that can change a lot when it arrives.

Thank you Peter for the videos.

Also posted in Central-Apollo-AIR, Flash 2 Comments

Thermo

Aral again has the video. Simply amazing.

In summary, Thermo will be the visual way to create Flex applications, more specifically UIs.

Some say Flash is for designers, Flex is for developers, how will Thermo change this? Actually, the way I see it, Flash is for animations and more creative work, while Flex is for RIAs. Thermo will make RIA creation workflow easier and also will let designers in.

Exciting times ahead!

[Update: Thermo is now Adobe Flash Catalyst]

Also posted in Flash Tagged , 5 Comments