“Make Me Sexy Flexy!” Demo From JavaPolis

The buzz around Flex at JavaPolis last week was unreal. It’s great to see so many Java developers get excited about the sexy UIs you can so easily build with Flex! I even had numerous people approach me throughout the week and show me some cool Flex app they built in their first day of Flex programming. Java developers everywhere are falling in love with Flex!

All the Flex / JavaPolis blogs not listed on my previous post:

My “Flex and Java” session on Friday was tons of fun. In a few minutes I was able to build “Sexy Flexy”, an application with a Sexy Flex front-end and a simple Hibernate back-end. The application allowed users to take their picture, enter their name, and save them to the database. Then using Flex Data Services these pictures push in real-time out to all of the people using the application. I was hoping that everyone in the audience with a web cam would get on my wireless network and use the application… True audience participation! Unfortunately my wireless router was not cooperating, so it was just Christoph Rooms and I taking pictures. Oh-well. But I have posted the application (slightly modified). Check it out:

Make me Sexy Flexy!

If you are interested in seeing the code, it’s on SourceForge. Special thanks to Ely Greenfield for his DisplayShelf, Carousel, and all the help; Narciso Jaramillo for the DragPanel, Reflector, and SelfLabelingTextInput; Tinic Uro for the PNG Encoder. And thanks to all those who attended my sessions at JavaPolis! It was a fantastic event!

Flex at JavaPolis – “Umm That’s Sexy!”

Christoph Rooms and I have been showing off Flex all week at JavaPolis. Everyone is loving it! Check out the crowd of people watching demos and winning shwag (click the image below to see more pictures from JavaPolis):

Also we have had numerous people blogging about Flex at JavaPolis:

This week at the conference Jon from BEA even built a Flex app with vi and the free Flex SDK! Nice work Jon!

Last night Christoph and I built a little Flex app with Ely Greenfield’s FishEye component, to show all the people who have visited our booth:


If you are at JavaPolis, we are having two more sessions on Friday:

We’d love to meet you and show you some sexy demos! Please stop by the Adobe booth, get a free t-shirt, and be Flex’d!

*** Update ***
Bill from Artima did a podcast with me yesterday about Apollo. You can listen to it here:
http://www.artima.com/lejava/articles/javapolis_2006_wed_idols.html

*** Update 2 ***
Another blog from JavaPolis about 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!

*** Update ***
I didn’t realize it before but I guess we are expecting a ton of people and I’m only going to drag 150 Rubik’s Cubes to Antwerp. So, the first 150 lucky people at the session on Tuesday will get the free Flex Edition cubes. So get there early!

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
sudo emerge -av netscape-flash nspluginwrapper

Then I reloaded Firefox, tested it, and it works great! I assume it’s this easy on other distributions, but I only have Gentoo to test on.

Of course this means much more than just being able to watch YouTube videos… Now that the Flex 2 SDK is free (as in beer) anyone can build applications that work the same on all major browsers and operating systems! I’m happy to say that since I started doing Flex development about two years ago, Firefox on Linux has been my primary build and test environment. And in that two years the only time I’ve had to write any of those “if IE” things was when I was writing JavaScript for a soon to be released Ajax & Flex benchmarking tool.

Using my OS of choice… Writing code once that works the same universally… These are things that make me happy. :)

Oh, and the fact that Flash is now built on the Mozilla / Open Source Tamarin VM makes me ecstatic!

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.

*** Update ***
Good news! The Kuler team has updated their site to now work on Linux! Now this is the beauty of the Flash Platform! True write once, run anywhere applications! And you don’t even need any “if IE” hacks! And you can even get away with only testing on one browser and one OS (provided you mind the gap). :)

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.

Read more

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!