Flex

My MAX 2009 Sessions

MAX 2009 is coming fast! It’s going to be another great event with tons of great speakers and after party fun. Here are my sessions this year:

Also Drunk on Software will be there filming some episodes.

So this is certainly a MAX you don’t want to miss! I hope to see you there!

Flex and Java Festivities Next Week in Florida

I’ll be in Florida next week for a few great Flex and Java events:

If you live in Florida then I hope to see you at these events!

Fonts in Flex 4 / Flash Player 10 / AIR 1.5 Make Me Happy

Device font rendering in Flash content has always had some limitations, including the inability for text to be correctly scaled, rotated, and faded. Due to these limitations many developers using Flex resort to embedding fonts. But this can really bloat the size of applications - especially when working with non-English languages. Luckily Flash Player 10 / AIR 1.5 added a new font engine! To make using the new engine easy Adobe also created an open source library called the Text Layout Framework, which wraps Flash Player’s low level text APIs. Flex 4 Spark components use the Text Layout Framework for all text rendering. The end result is much better device font support in Flex applications. Here’s a quick example (view source):

Protected Messaging in Flex with BlazeDS and LCDS

UPDATE: BlazeDS 4 and LCDS 3.1 now have built-in support to disallow subscriptions to wildcard subtopics. Just set the following parameter on the messaging destination’s server properties:

<disallow-wildcard-subtopics>false</disallow-wildcard-subtopics>

You no longer need to use the ProtectedMessagingAdapter from the code examples below in order to protect your messages.

One of the great things about Flex is how easy it is to set up publish and subscribe messaging using BlazeDS, LCDS, or other various server technologies. Basically a Flex application can be either a Consumer of messages from the server, a Producer of messages to the server, or both. The channels that are used for the actual transport can vary dramatically depending on the needs. Here is a great blog that explains the different transports. No matter what transport / channel is used the API in Flex is the same. If you'd like to see how to use those APIs check out this video I recorded.

Flex 4 Example – Halo Component with Spark Skin

Lately I’ve been playing with the Flex 4 Beta to better understand the new Spark component set. Halo is the name being used to describe the Flex 2 and Flex 3 component set. In Flex 4 you can choose to either use only Halo or use both Spark and Halo together. Since Spark has some great features like improved skinning and FXG (declarative vector drawing) support it is a great option for creating pixel perfect UIs. But sometimes you might need to stick with the Halo components. Luckily it seems that you can use the Spark skinning classes on Halo components. Here’s an example of this technique based on an earlier demo I built which used only Spark:

Drunk on Software Episode 14 – FlexMonkey Fiesta at Casa Bonita

To celebrate the launch of FlexMonkey 1.0, Drunk on Software went to Cartman’s most favorite place in the whole world - Casa Bonita. And there at Casa Bonita amongst happy children and cliff divers, Episode 14 came to be. I’m not sure if it was the margaritas, my pink feather boa, or the ambiance of Casa Bonita but this one was really fun. So grab a marg, sit back, and drift to that happy place - it’s Drunk on Software at Casa Bonita!

Give your mouse a break! FlexMonkey 1.0 Released

Typically when I develop Flex apps for the browser or the desktop (via Adobe AIR) I do a lot of clicking to test every change I make. My mouse gets a little worn out and I waste a lot of time. Luckily there is a better way to test Flex apps. Flex supports automated testing of applications but you need software that does the record, playback, and test validation. FlexMonkey is a free and open source tool that does automated testing on Flex apps. It just reached the 1.0 release and it now contains a number of new great features like: