Joeflash’s Enigmacopaedia


Flash vs The Open Web: The FUD Continues

Posted in AJAX/DHTML, Browsers, Flash Platform by Joeflash on the April 27th, 2010

The thing that isn’t being said in all of this, in every debate I hear of “Plugins vs The Open Web” is the assumption that somehow, because it’s open, it’s somehow better. Better for whom?

Thing is, users, who at the end of the day are the major consumers, don’t give a damn if something is open or not, just that it works, that it’s interesting, that it captivates their attention, that it allows them to do what they have come to expect to be able to do, which is admittedly a floating target.

Developers, on the other hand, have a more complex set of priorities. What makes a technology good or bad for developers IMO is based a lot more on the perception of that technology vs its actual performance than one might think. That perception is fuelled by developers, but also by evangelists and tech pundits who each have their stake in the acceptance of a given technology.

Just look at the FUD generated by Apple recently around the Flash Player: Steve claims, in sum, that Flash is a crappy technology, and despite such assertions being proven utterly false, others believe it because of the trust Apple has built up around is products. Likewise, many Flash developers (of which I count myself) have decided that Apple is now an evil company who is against them, simply because Apple is protecting their platform’s market share from an incumbent.

So I’m not going to talk about which is actually “better,” because it’s a meaningless conversation. Each has its uses.

The problem I have is with the FUD generated over this issue.

In discussing “Flash vs the Open Web,” I’ll never understand why so many otherwise intelligent and tech savvy people go all soft in the head and completely miss the distinction between a language and a runtime.

People talk about the Open Web as if somehow browser makers Google or Mozilla or Apple or Microsoft or Opera are completely “open” about how they develop their own products. That somehow the W3C or ECMA establishes their standards (which browser makers may or may not implement) based on the feedback of a community of open source developers (which they don’t, BTW).

So how is that different from Adobe being the sole director of how the Flash Player is built?

(And yes, like Mozilla, Google, etc., Adobe does actually solicit feedback from industry and developers on what to include — and like Mozilla, Google, etc., they alone decide the direction of the technology.)

If we apply the same metrics to the Flash Platform as the Open Web, we find that ActionScript (a distant cousin of JavaScript) was “openly” guided by the ECMA, until Microsoft stepped in and played its trump card, derailing the development of ECMAScript 4 forever. Flex, like AJAX, is an open source framework, as are the dozens of open source MVC frameworks and libraries out there. And just as WebKit and SquirrleFish are open source runtime “components” of many browsers, Adobe has released part of the Flash Virtual Machine as open source under the Tamarin project, and AIR 2.0 uses both WebKit and SquirrelFish Extreme.

The only distinction I can see between the Flash Platform and the “Open Web” is that HTML/JavaScript interpreters are built into browsers, and the Flash Player is currently an “add-on” to browsers. But that is changing.

So tell me again how the Flash Platform is different from the “Open Web”?
I don’t see it.

Update: As Ted Patrick tweeted recently on Google’s Andy Rubin:

Sometimes being open “means not being militant about the things consumers are actually enjoying.”

Amen to that.

Rounded Clipping for Fx4 BorderContainer

Posted in Flex, Flex 4 by Joeflash on the March 17th, 2010

A few days ago someone in the Flex 4 prerelease forums posted an interesting question: how do you create a rounded clip area for a spark container? Not knowing the answer off the top of my head, I thought this would be a good opportunity to teach myself some specifics about creating custom container components in Flex 4.

MaskedBorderContainerSample

First I tried the obvious, which was to set up two elements and make one the mask of the other, like so:

  1. <!-- maskee -->
  2. <s:Group id="cpmaskee" width="400" height="250" top="20" left="20"
  3.          mask="{cpmask}">
  4.     <!-- this is the content -->
  5.     <mx:Image source="@Embed('wallpaper-halo-3-01.jpg')" x="-100" y="-100"/>
  6. </s:Group>
  7. <!-- mask -->
  8. <s:Graphic id="cpmask" top="20" left="20">
  9.     <s:Rect width="400" height="250" radiusX="20" radiusY="20">
  10.         <s:fill>
  11.             <s:SolidColor color="0xCCFFCC"/><!-- can be any color -->
  12.         </s:fill>
  13.     </s:Rect>
  14. </s:Graphic>

Which resulted in a nice rounded mask over the content:

MaskedBorderContainerTest1

But this was not quite what I wanted. The entire image was still being rendered, only not visible through the mask. So the edges of the image needed to be clipped regardless of whether the corners were rounded. And to be able to see a rounded border.
(more…)

Simple Monkeypatch to fix ToolTipManager.destroyToolTip RTE

Posted in Flex, Flex 3 by Joeflash on the March 13th, 2010

So I’m coding a custom tooltip which stays visible when you click on the target (more on that in a future post), so I need to manage the tooltip behaviour with ToolTipManager.createToolTip rather than the UIComponent’s tooltip property, or tooltip events. Ben Clinkinbeard’s monkey patch for ToolTipManagerImpl came in real handy for this.

From this “always on” tooltip, I have a button which asks the user for confirmation before performing the action, after which I dismiss the tooltip. Problem is, an RTE “The supplied DisplayObject must be a child of the caller” always ensues.

Until I realized that calling Alert.show() when a tooltip is showing always dismisses the currentToolTip. So calling ToolTipManager.destroyToolTip on a ToolTip which had already been “dismissed” would of course generate an RTE.

Shouldn’t the ToolTipManagerImpl class be smart enough to figure this out without bugging me with an RTE? Shouldn’t it check first to see if there are children present to remove before attempting to remove them? There may be other situations in my app where I may not always be aware of whether my tooltip is located in the toolTipChildren list.

So, taking a cue from Ben’s monkeypatch, I scrolled down to the next function, and monkeypatched mx.managers.ToolTipManagerImpl.destroyToolTip():

Original code:

  1. public function destroyToolTip(toolTip:IToolTip):void
  2. {
  3.     var sm:ISystemManager = toolTip.systemManager as ISystemManager;
  4.     sm.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", DisplayObject(toolTip));
  5.     // hide effect?
  6. }

Monkeypatched code:

  1. public function destroyToolTip(toolTip:IToolTip):void
  2. {
  3.     var sm:ISystemManager = toolTip.systemManager as ISystemManager;
  4.     if(sm.topLevelSystemManager.toolTipChildren.numChildren){//patch to avoid RTE//
  5.         sm.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", DisplayObject(toolTip));
  6.     }
  7.     // hide effect?
  8. }

In addition to correcting my errant destroyToolTip call, this solved any future unknown RTE’s around that issue.

Alternately, if you don’t want to monkeypatch the ToolTipManagerImpl class, you can wrap your destroyToolTip call in a try/catch error block.

The Future of Crash Reporting For The Flash Player

Posted in Adobe, Flash Player, FP10, Flash Platform Community, Flash Platform by Joeflash on the February 12th, 2010

Lately Adobe and Flash have taken a lot of heat over the real and perceived instabilities of the Flash Player. Depending on who you talk to, these are due to the Flash Player itself, or the fault of poorly developed applications. But how would Adobe know the difference, other than through us developers painstakingly filing Flash Player bugs (and bugging Adobe to fix ‘em)?

Kevin Lynch recently discussed Adobe’s views and improvements in bug reporting and Flash Player performance. Mike Chambers chimed in to confirm these changes to the Adobe Bug system. And just today, Tinic Uro, Flash Player engineer from whom we have not heard from in over a year and whose articles are amongst my most prized links, treated us with an article on Apple Core Animation vis Flash Player performance.

And with the inclusion of the much anticipated (and debated) Global Error Exception Handling (FP-444) in Flash Player 10.1, Adobe has shown that the community is being heard (eventually).

This is a good first (and necessary !!!) step, but what the Flash Player needs is better automatic crash and exception error reporting.

My colleague Matt Fabb and I have put together three feature requests that I believe hold the key to making the Flash Player a much more robust development platform.

  1. In the right-click context menu include a link to the player’s bug system
  2. Automatic crash reporting built into all versions of the Flash Player
  3. Flash Player API hook to allow for custom automatic exception error reporting

(PS: Vote for these FRs!!)

The first allows people to submit a bug to Adobe’s (now open) Bug Reporting system, which Matt has eloquently described on his blog.

The second feature request would have a second process “monitor” the health of the Flash Player and send an automatic crash report to Adobe if and when the player process crashes through a fatal exception (which most of the time also takes down the browser). This will give Adobe invaluable insight as to why so many users bitch about claim that the Flash Player is unstable on certain OS/browser configurations, without Adobe relying solely on an army of QA engineers.

The last feature request would allow for an addition to the global exception API (as requested in FP-444 and detailed in the livedocs), to allow developers to specify a server to automatically send uncaught exception data, in the eventuality that the application itself crashes, which would prevent it from otherwise being able to send such a report.

Vote for these three feature requests, and get a glimpse of what the future may hold.

Does Flash Need Saving? Nahh…

Posted in Adobe, Browsers, Flash Platform Community, Apple, iWhatever by Joeflash on the January 31st, 2010

Flash isn’t on the iPhone. It isn’t on the iPad, either. And for this, everyone is losing their minds.

Flash haters are coming out of the woodwork proclaiming the death of Flash, eager to feast on the dead flesh of another technological casualty while they bow in fealty to their white shiny god (Apple, dummy! :). Silverlight lovers, usually so vocal against Flash, are conspicuously absent from the debate.

But I think it’s a little premature to announce the demise of Flash. As my estimable colleague Derrick Grigg pointed out, there are so many things that Flash can do that are specialized and unique that no other web technology can do well.

As to the criticisms of the Flash Player: it crashes on OSX, it’s unstable, it’s insecure, it’s a resource hog. All potentially true, on the surface. But like a fixed TV debate subject to concision, 140-character tweets and troll rebuttals cannot give the whole story.

Flash does not work as well as it can on OSX because Apple and Adobe aren’t working well together, for whatever reason. Whether it’s Adobe being lazy in not utilizing Carbon in innovative ways, or Apple will not cooperate with Adobe in helping them develop better integration, I don’t particularly care who’s at fault. And it doesn’t look like it’s going to improve anytime soon. It looks like the two have declared war on that issue.

Runtimes like the Flash Player are more akin to browsers than the language which runs in them. So comparing HTML5 to the Flash Player is like comparing apples and oranges. It would be a more equal comparison if the Flash Player runtime were compared to Firefox, or Chrome, in that the Flash Player is the engine that renders [a SWF file containing] the language. Saying that HTML5 is better than Flash is like saying Javascript is better than Firefox. Huh? Say what?
(more…)

Why Flash is Not on The iPad

Posted in News, Adobe, Flash Player, Mobile Flash, FP10, Flash Platform Community, Apple, iWhatever by Joeflash on the January 30th, 2010

There is a polarizing debate going on between “iPad - Flash = Epic Fail”, and “Flash is dumb/crashes/obsolete/ads/porn/who cares,” bordering on the religious. Problem is, many of the cons against Flash are the same tired HTML fanboy arguments one hears, as if by trolling force alone millions of sites will go dark overnight. There’s only one reason why Flash is not on the iPad, or the iPhone for that matter.

It’s not 3G bandwidth. If Rogers or AT&T has oversold its network capacity and cannot deliver 1/10th of its advertised 7.2Mbps with a clear signal in a major urban environment, they deserve to be taken to court for false advertising. Even then, I am on a wireless connection at home, and during peak hours the connection can slow to dial-up speeds. When that happens, I click on FlashBlock, and only click to enable the Flash content I know I want to watch. So tell me one good reason why Apple could not disable all VM plugin content by default, and enable them by a click on the little blue lego. No, I can’t think of a reason either.

It’s not performance. As Lee Brimlow, Flash evangelist for Adobe comments, Adobe is willing to work with Apple on improving the performance of the Flash Player for this mobile device, as they have with every other major manufacturer. The fact of the matter is, Apple will not let Adobe play in their sandbox. And yes, I will concede, Flash could be better engineered to run on a Mac, as John Gruber claims — but that is besides the point, because we’re talking about a completely different product and OS here. As Peter Elst mentions, “With the iPad we’re talking about a different device, a processor that clearly is capable of high performance rendering”.

It might be about the fact that Flash will allow content that cannot be sold on the App Store, but that does not hold water either. App store revenues of millions a year do not threaten a billion dollar revenue base.

There is only one reason I can think of that makes any sense why Apple would do this.
(more…)

Adobe Flex 3.5 SDK Released

Posted in News, Flex, Flex 3 by Joeflash on the December 15th, 2009

Today Adobe released version 3.5 of the Flex SDK.

I noticed that the Flex Downloads and the Flex 3 Release Notes pages have not yet been updated for v.3.5. Let’s hope Adobe releases the automation and visualization SWCs for v.3.5 as well.

UPDATE Jan 23, 2010: As reported on the Flex Team Blog on January 5th, the datavisualization and automation libraries are now available on the Adobe Flex SDK Downloads page

The Age Barrier Myth in The Flash Community

Posted in Business, Inspirations, Employment, Flash Platform Community by Joeflash on the December 9th, 2009

A very interesting question, or rather comment, was raised a few weeks ago in a LinkedIn discussion titled,

“Why Am I in Demand?” - Personal Branding for Mature Workers

The problem with this question, other than being a blatant grab for eyeballs, is that it’s not targeted in the least towards the Flash community. But it does underlie a perception I’ve noticed amongst some Flash designers & developers who may be just starting out, or are looking at stepping up their profile in the community and the job market.

I’ll save you the tedium of watching this video blog: according to the author, there are 5 questions you need to ask yourself:

1. What makes me tick?
2. What can I deliver?
3. How do I make my workplace better?
4. Why am I in demand?
5. Why should you hire me?

First, if you’re interested in becoming an office drone, with a job as exciting as the monotone delivery of the author’s video blog post, then by all means answer these questions. But if you want to have a kick ass job or a freelance business that you’ll love, ask yourself this:

1. How well do I communicate, verbally and on paper?
2. Do I have the chops to get the job I want, and if not how do I acquire them?
3. Do I care about sharing my discoveries and fostering a sense of community?

Second, the very idea that a person would be reading a blog dedicated to “Personal Branding for Mature Workers” is just wrong. I’ll tell you why:

It doesn’t matter how old you are in this industry. That’s a myth.
(more…)

The Pain of Downloading A Complete Flex SDK

Posted in Flex, Tools, Flex 3, Flex 4, Flash Builder 4 by Joeflash on the November 24th, 2009

Usually, when adding new upgraded SDKs to Flex Builder, say to version 3.4, I’ll go to the adobe open source site and download them from here. Problem is, I’ve then got to hunt around for the download link for the datavisualization components and the automation components (not that I use them all that much, I just like to have them handy).

This page on Adobe’s website tells you that the datavisualization components and the automation components are available on this page. And yet you go there, and no download link. Turns out that the actual download page was listed on the Flex Team’s blog, which leads you to the correct download page here. Good thing I bookmarked it, or I might have a real hard time finding it, cause it sure doesn’t show up on a simple Google search.

And then I’ve got to merge the upzipped datavisualization and automation folder structures with the unzipped Adobe SDK download, to get a “complete” SDK.
What a huge pain.

But there’s an easier way.

While I was installing Flex Builder to a new machine, including migrating all my SDK version folders, I thought, why not take a peek at the latest Flash Builder 4 Beta 2 application installation?

And lo and behold, versions of the following SDKs, which include datavisualization and automation components:

  • Flex SDK version 3.4.1.10084 (stable build)
  • Flex SDK version 4.0.0.10485 (milestone build)

(You can find the full SDK version number in the flex-sdk-description.xml file in the root of the SDK folder.)

So all I did was copy those folders from the Flex SDK 4 Beta 2 sdk folder to the Flex Builder 3 sdk folder, et voilà! :)

NOTE: the Flex SDK 4 Beta 2 download from the Adobe Labs page is incorrectly named as version 4.0.0.100509 in the filename. This zip file is in fact version 4.0.0.10485, and is the exact same zip file as the milestone listed on this page, which you can download here.

Except for one thing…

(more…)

Stratus-pheric Confusion

Posted in Enigmacopaedia, Business, Branding, Adobe by Joeflash on the November 20th, 2009

You may have heard the news that last month, Adobe and Salesforce.com jointly announced Flash Builder for Force.com (which is a great idea by the way).

And it’s codenamed — are you ready for this? — Stratus.

Gosh that seems familiar… isn’t there already a product with that name? Why yes, it’s Status, Adobe’s RTMFP service.

You’d think that if someone were to introduce a product using Adobe’s tools, they could at least Google whether it had been taken.

Maybe next time they should use a codename generator ;)

Next Page »