Flex

Sexy Web Apps, Free Rubik’s Cubes, and iPods at JavaPolis

What more could a nerd want? Next week I will be at JavaPolis talking about Building Sexy Web Apps. Attendees will receive a free Flex Edition Rubik’s Cube! The first person to solve theirs will win an iPod nano! Then on Thursday at 4:10pm, bring your Flex Edition cubes to the Adobe booth for speedcubing madness! Fastest speedcuber gets an iPod nano! If I still have any cubes left on Friday, you will also be able to get them at either of my sessions; Adobe Flex 2.0 & Java : RIA for the Enterprise or Flex 2.0 @ Work in combination with Spring and Hibernate. Better start practicing your speedcubing! These Flex Edition cubes are much harder than regular Rubik’s cubes! See you in Antwerp!

Over 5000 Flexcoders!

I just noticed that the flexcoders Yahoo! Group now has over 5000 members! That’s pretty amazing! This list was founded almost 3 years ago on March 17, 2004. But my first post wasn’t until January 17, 2005. So I am but a newbie. Congrats to all those early founders who started the revolution and have continued answering questions for years and years. A special shout-out to Matt Chotin who has posted 3407 messages! Wow!

Flash 9 on 64bit Linux in 2 Commands

I’ve heard it so many times… “Flash 9 doesn’t work on 64bit Linux” So when I loaded 64bit Gentoo Linux my new Merom based Intel Core 2 Duo, I really was expecting an adventure. Turns out that it was actually pretty uneventful. It worked first try without any problems and in only 2 commands. Here’s what I did..

First I added the net-www/netscape-flash package to /etc/portage/package.unmask

sudo vi /etc/portage/package.unmask

Then I emerged Flash 9 & the Netscape Plugin Wrapper

Please Mind the Gap; Between Flash Versions

Currently the latest version of Flash 9 for Windows & Mac is 9.0.28.0 and for Linux (currently in beta) it’s 9.0.21.78. Notice that that third digit is different? That’s mostly because Flash 9 for Linux doesn’t yet support full screen. Unless your application is unusable without full screen, then please be nice to us folks on Linux and don’t tell your Flash detection script to require 9.0.28. This is an easy mistake to make. Even we (Adobe) recently did this with the Kuler app. Which currently doesn’t work on Linux due to an evil 28 in the detection script. If you really do need 9.0.28, then the right thing to do would be to tell your detection script to require it for Windows & Mac, and just require 9.0.0 for Linux. Otherwise we end up having to write GreaseMonkey scripts to de-28 offending pages. And nobody wants to join the list of sites which need de-28 grease.

HowTo: Reduce the size of your Flex app

Flex 2 added a neat little feature which allows you to load Runtime Shared Libraries, from other domains. And since the browser caches these libraries in theory we could all point to a central set of Flex 2 Framework RSLs and users of your application would only have to download the RSLs the first time they went to an application which used them. Before I show you how to make this work, lets talk about the caveats… First and most important, THIS IS UNSUPPORTED BY ADOBE. While the Flex team is working on a better, more permanent solution to this problem, this is really a hack and despite the fact that I am using this in my applications, neither I or Adobe warranty or support the use of this in any way. Second, since there is no failover mechanism, until we find a better home for the RSLs, if you choose to point to my hosted RSLs, your application will be at the mercy of my web server. Third, if someone hacks my web server and uploads new cracked malware RSLs, or uses a man-in-the-middle attack to replace the RSLs in flight, then you (and I) have been p0wned. Fourth, I, James Ward, may have included modified Flex framework files which do bad things, like track user behavior/input and report them back to my server. While I promise I have not done this, if you choose to use these RSLs, you are putting your trust in my promise.

So despite the caveats, I still think this hack is sufficient enough for many applications. Flex engineering is really working hard to make this work for everyone. In the mean time what is outlined here may likely help you to dramatically reduce SWF size. Read on to find out how.

Screencast: Watch a Flex app built in 11 minutes

[Update: This screencast has been updated for Flex 3. Read more about it here.]

Many times I am asked “Where do I start learning about Flex?”. Most of the time I point them to flex.org as a starting point. However it is often just easier to see the product in action. So I recorded a screencast of me building a simple Flex app with Flex Builder. Here it is:

http://www.adobe.com/products/flex/media/flexapp/

I hope this is helpful to those of you new to Flex. After you watch the screencast, download Flex Builder and give it a try. If you find yourself saying things like “Wow! Coding is fun again!” or “I had no idea RIA programming was so easy!”, Welcome to Flexland! A few years ago I found myself in Flexland and to me it’s like being in the mountains… Once you are there, you never want to be anywhere else. :)

Flex Widgets from WidgetsLive!

This morning I had the opportunity to present at the WidgetsLive! Conference about Flex and widgets. I showed a few examples using Ely Greenfield’s DisplayShelf component. One example pulled in images from Flickr. Check out the demo and the code. I also was thinking it would be cool to throw some YouTube videos into the DisplayShelf component. After a few minutes I was able to make it work with the exception that I couldn’t get the reflection to not flicker during video playback. I’ll need to get help from Ely to fix that, so for now I’ve disabled the real-time reflector. You can see the demo of the YouTube DisplayShelf widget and get the code. I also quickly turned one of the Display Shelf apps into an desktop widget using Apollo. I hope all the attendees enjoyed the session and for those who weren’t there, enjoy the demos!

Flex Your Oracle Portal

Last week while many of us were gallivanting around Vegas at MAX, Oracle was holding their OpenWorld conference in San Francicso. Unfortunately I wasn’t able to be in two places at once, so I didn’t attend OpenWorld. But I did have the opportunity of building a Flex demo for one of the Oracle keynotes. I really just took a few of our sample applications and portalized them. You can see the end result on Oracle’s Portlet Testing Site. One cool thing to point out is that the portlets are actually remote portlets being served via Oracle’s JPDK. In case you want to play around with these portlets in your own portal, the provider url is: http://www.jamesward.org:8888/flexportlets/providers/flex_portlets

FLASH & FLEX: FREE FOR ALL (even Linux)!

As of yesterday, for the first time EVER, nearly everyone in the world has access to a FREE, ubiquitous application runtime, and a FREE application development toolkit for that runtime! Of course I’m referring to Flash Player 9 and the free Flex 2 SDK. To show people the power of these two technologies I’ve recorded a screen cam of me building a YouTube video player on Linux. Check it out!