Current User: guest
<
Blog
Welcome to the Blog
This is the new SOSensible site blog. We hope you find stuff worthy of your visit!

Flex vs AJAX on CSS

(Posted on 23-Mar-09)

OK... last summer when speaking at a Flex Camp on AJAX integration someone was there to show off Degrafa. It was cool but this is the first time I took a serious look at it. Made an excuse to put it off because some of this type of thing is coming in Flex 4. SHAME ON ME!

So, what can you do with Flex/AIR and the Degrafa plugin that you cannot do with AJAX/HTML AJAX?

Button {
   skin: ClassReference("com.concepttopromotion.jaf.skins.appButton");
   mainColor: #44B1FF;
   downColor: #225688;
   borderColor: #FFFFFF;
   cornerRadius: 8;
}

The first thing we notice is the connection to the Flex component. Then we built inside the component some connections to the 'Button' attributes. If the attribute exists we assign the class attribute value to the 'bound' variable inside the component.

if(getStyle("mainColor")) { _mainColor = getStyle("mainColor"); }

Now we can use and reuse the component without needing to touch the component to change the style. Seperation of content from presentation is a value we hold. This technology achieves it in "Style". Degrafa doesn't stop there.

In conclusion here are some thoughts. We are waiting for HTML version 5 and CSS 3. Yet what will either of these do for allowing us to set features like the ones above. This was just a small glimpse of what is possible. Some people complain that Flex apps look like Flex apps. Complain no longer and jump in with me to deliver richer looking apps using Degrafa.

Degrafa Site