Category Archives: Adobe Flex

Adobe Flash – Brave Fold

In poker, a brave fold would be a case where you have a strong hand and you are already committed to the pot (you’ve already put in some substantial amount of money), even so, you sense that your opponent might have a stronger hand and you fold – losing your strong hand and the pot. Staying in the game would have required you to danger even more money, maybe too much.

Adobe was in similar situation, it has a very strong hand – Adobe Flash, and has already committed a lot of money on this loss leader. But staying in the game would have required them to put even much more money/resources on it. They would have to be fully committed, they would have to be “all-in”, borrowing from poker again. They could have end up winning the hand but if they will lose they can be out of the game completely.

We should have all known that the iOS will never run Flash. It’s almost like Steve Jobs last words were “exterminate the Flash” – similar to the hate Genghis Khan had for the Tatars when he ordered  “the extermination of the Tata Mongols

In retrospect, seems like wasting all that resources on porting Flash for the mobile was good only for Adobe and us in the Flash crowed to be able to give Steve and the other mongers the finger, telling them – see, Flash runs well on the mobile! It was supposed to be obvious that Flash will never rich similar ubiquity on the mobile as on the desktop. Than again, everything is easier in retrospect.

There are many reasons why Flash succeeded where 1,000 other plugins failed. And it’s also amazing how a relatively small corporate like Adobe managed to be in front of much bigger competitors, Microsoft with it’s buckets of money and Sun with it’s Java Java Proxy Proxy, to name only two.

I’m just sick of layman’s that are quoting laymen’s that are quoting a reporter that quotes another reporter that quote “someone who knows” that quote anther one that “really knows” – it’s like that game, what’s is name?! The other day I’ve heard from someone who should have known better that – “lake of multithreading killed Flash” – you’ve probably heard that BS before, yep it’s total BS. Add that to the many other miss-consumptions people make regarding this issue and it piles to a big pile of sh<bip>it. I wonder how many of these laymen’s knows the hassle of cross browser HTML development?!

So, congrats on the brave fold Adobe, with the right hand I solute you. On the other hand I’d say f*ck you big proprietary beast, how dare you stab so many people in the back.

Putting Data Into Context

The challenges of presenting large amount of data visually in a way that one will be able to easily digest and understand it are becoming more viable daily. The democratization of data, challenge authors to think about new ways to visualize it.

The above text, is pretty much the summery of this highly inspiring video called Journalism in the Age of Data. As the name suggest this video is mainly about journalism data viz, but, it is also highly inspiring for anyone dealing with data of any kind.

Many RIA applications today struggle with the ability to present large data sets to the user in away which he can digest and understand.
I would say that many of these new apps, especially in the enterprise space and from the last few years, are built upon the Flex framework.

As RIA developers many of us face these challenges in the day to day work. Obviously, the charts that comes bundled with the Flex framework won’t suffice most of the time, and one would need to relay on third party components or role her own. Not so long ago, its seemed that this area is blooming. The amazing open source projects like Flare and BirdEye. The slick commercial components, IBM ILOG Elixir and KapLab – ridiculously priced and has draconian licensing, respectively.

Today, these open source projects seems to be abandoned and the commercial tools prices seem to increase. The field of online data visualization is exploding and yet the Flex tools seems a bit halted.

The somewhat halted SilverLight with its basic charts and decent third party components. And the HTML5 alternatives, like Protovis, which still needs some maturity – doesn’t seem to provide the alternative.

Anyhow, if one wants to create something “out of the box”, than she needs to use something like Flare as the base and invent her own data viz, other than use some slick, out of the box, components.

InsideRIA has an immense list of with most data visualization frameworks and resources


The Video

I’ve extracted some selected examples, for your convenience:

Many Eyes (Java)
Budget Forecasts, Compared With Reality (Flash)
The Jobless Rate for People Like You (Flash)
In graphics: Eurozone in crisis (HTML)
The Stimulus Tracker (Flash)
Crash: Death on Britain’s roads (Flash, HTML)
How Different Groups Spend Their Day
The Crises of Credit
Last.fm Listening History – What have I been listening to? 
Eurovision Song Contest 2008 (Flash)
Google public data explorer (Flash, HTML)
Oakland Crimespotting (Flash)
Tracking Taxi Flow Across the City

Blogs:
http://infosthetics.com/
http://www.visualcomplexity.com/vc/
http://flowingdata.com/
http://blog.blprnt.com/
http://www.good.is/infographics
http://eagereyes.org/
http://www.guardian.co.uk/news/datablog
http://well-formed-data.net (not from the video)

Exotic Flash Builder 4 Tips and Tricks

The Flash Builder is built on Eclipse, you know, hence many of Eclipse stuff will naturally comply, also, these tips will mostly work the same in Flex Builder 3 and Eclipse.

-> Browse to any file or directory

It’s essential to be able to easily browse to the resource you’re currently looking at. There should have been a built in way to do this.

1. Click on, Run –> External Tools -> External Tools Configuration (Alternatively, click on the Favorites icon and select "External Tools Configuration")

image

2. Inside the "External Tools Dialog" -> Select "Program" -> click on the "New Launch Configuration" icon.

image

3. Inside the "Main" tab (Default) set:

  • Name: Explorer
  • Location: c:windowsexplorer.exe
  • Working Directory: c:windows
  • Arguments: /select,"${resource_loc}"

image

4. Go to the "Build" tab and uncheck "Build before launch"

image

5. Go to the "Common" tab, look for "Display in favorites menu" and check "External Tools"

image

You can now select any file or directory from the “Package Explorer” and browse straight to it’s location in windows explorer.

image

-> Extending with batch files – kill all IE processes

Flash Builder 4 can be extended using batch files (Shell Scripts on the Mac). This example uses a batch file to kill all opened IE processes before launching a new debug session.

There are a few reasons to debug a Flex app in IE. Firstly, some users still use it, and secondly I don’t want the precious tabs that are opened on my other useful browsers to be bothered. Occasionally, IE processes are left running in the background even though debug session was ended. Sometimes I simply didn’t closed the browser before running a new session. Both of these cases lead to the consuming of needed memory and slows down the system.

A batch file is merely a text file with a .bat extension.

  1. Create a new text file.
  2. Edit this file with any text editor –> Copy paste this line into it: taskkill /F /IM "iexplore.exe"  -> Save this file as kill_iexplore.bat (Double clicking on this file will kill all IE processes)
  3. Click on, Run –> External Tools -> External Tools Configuration
  4. Inside the "External Tools Dialog" -> Select "Program" -> click on the "New Launch Configuration" icon.
  5. Inside the "Main" tab (Default) set:
    Name: Kill Internet Explorer
    Location: c:kill_iexplore.bat
    (depending on were the file is saved)
    • Go to the "Build" tab and uncheck "Build before launch"
    • Go to the "Common" tab, look for "Display in favorites menu" and check "External Tools"

    – In Order to kill all IE processes before launching a new debug session

    1. Right-Click on the flex project –> Select “Properties
    2. In the properties dialog select “Builders” –> Click on “Import” and select “Kill Internet Explorer” from the list.

    image

    -> Link with Editor

    This one is very helpful but easily overlooked, it’ll make the Package Explorer and the editor view synchronized.

    Click on this icon to make your life better.

    image

    -> Some Important shortcuts (For Mac CTRL == CMD, ALT == Option)

    Ctrl+Shift+T Find any class SDK included
    Ctrl+Shift+R Find any resource/file (wont find SDK classes)
    Ctrl+3 Finds everything, literally everything – files, commands, views (Amazing, try it, use it)
    Ctrl+Alt+Up/Down Duplicate a line or a block of code
    Alt+Up/Down Reorder a line or a block of code
    Ctrl+D Delete a line or a block of code
    Ctrl+Shift+L+L Open Configuration
    Ctrl+K Find next (like F3)

    Less important shortcuts

    Ctrl+O Current class outline
    Ctrl+Shift+G Finds all references in the workspace
    Ctrl+Shift+L Shows all shortcuts (key binding)
    Ctrl+M Maximize the selected view
    Ctrl+J Quick Search without the search dialog (click ESC when done)
    Ctrl+Shift+X To upper case
    Ctrl+Shift+Y To lower case
    Ctrl+I Auto indent selected code

     

    P.S. Why exotic?! It made you look didn’t it. And beside, it is somewhat exotic.

    P.S.S. At first I thought about writing a short post with only the first tip, but, thinking about it, I think I’ll make this an ever updating page. So if you have any other tip you like to share please write about it in the comments.

    Flash Player 10.1 Global Error Handling Examples and the Flex 3.x Issue

    We all welcomed this addition to the Flash Player 10.1. The ability to catch all exceptions inside the player has lots of benefits, from proper logging on to not annoying users that has the debug player.

    There are some code examples of how to implement this feature, and indeed it was a breeze adding it for pure Flash and to Flex 4.x projects. But, somehow I had trouble making it work for Flex 3.x project. I know it’s a player dependent but still something in the Flex 3.x framework killed this functionality.

    Anyhow, eventually it did worked for me on the Flex 3.x, but I couldn’t make it to work when even 1 of the libraries, except playerglobal.swc, is external or RSL. I guess there is no escape from monkeying with the RSL loader to see if I can find a solution there.

    I’ve mad these examples available, in case you need a complete example and/or also struggling with this feature on Flex 3.x. Also, in these examples I didn’t force the user to update the Flash Player and used a compiler argument -target-player=10.1.0 instead of modifying the html wrapper.

    All examples are viewable here, you can right-click on “View Source” or download the complete Flash Builder 4 projects (for Flex Builder 3 project, look at the comments).

    GEH Pure Flash

    GEH Flex 4.1

    GEH Flex 3.5

    Note: No need for the FP 10.1 playerglobal.swc to be inside C:Program FilesAdobeAdobe Flash Builder 4sdks4.1.0frameworkslibsplayer10.1 I’ve put it inside the libs folder.

    Developing Flash/Flex on Google Chrome

    I find Google Chrome fast startup and multiple processes, a key when developing Flash/Flex applications. And it’s my preferred target browser for stuff other than HTML.

    The problem is that, when debugging a Flash/Flex application and hitting a breakpoint, the Flash Player is stalled, chrome detect this stall and gives you this annoying message every 30, 60, 120, 240, etc’ seconds:

    —————————
    Plug-in Unresponsive
    —————————
    The following plug-in is unresponsive: Shockwave Flash
    Would you like to stop it?
    —————————
    Yes   No  
    —————————

    It’s very annoying when the context jump to chrome exactly when you intent to click on F6.

    Luckily we can use the -disable-hang-monitor startup switch  to avoid this annoyance. (All Google Chrome Startup Switches).

    Right-click on the desktop link to Google Chrome, select Properties and add the switch to the target:

    …ChromeApplicationchrome.exe -disable-hang-monitor

    From now on, start Chrome using this link, first, only than you’ll be able to debug in a new tab/window and not get the Plug-in Unresponsive message. The first Chrome window has to be the one started from this link. A bit awkward I know, but that’s the best there is right now.

    Trying to add this Startup Switch to the browser parameters inside Flex Builder didn’t worked for me either.

    My PureMVC presentation

    When it comes to enterprise application it’s difficult to recommend  project owners to bet on a framework that hasn’t proved itself for a long time. So all these sexy new frameworks with their lovely IoC will have to excuse us for now. That leaves us with cairngorm (yeah, I’ve heard the rumors) and PureMVC which is better IMHO and many others HO.

    Recently, I’ve made this presentation about PureMVC, targeted to a specific enterprise application. These are most of the slides from the presentation.

    Generally, the topics are:

    • Why use an application framework?
    • Why choose PureMVC?
    • The PureMVC meta pattern
    • PureMVC cons
    • Can we SCRUM it?
    PureMVC
    View more presentations from guya1.