What’s New in Adobe Flex 4

June 23rd, 2009 No comments

I just came across this article by Jon Rose over on DZone:

What’s New in Adobe Flex 4

This article provides a nice concise overview of the upcoming changes in Flex 4, including many that I mentioned in my previous post.  A must read if you have no idea about the new features and offerings in Flex 4.


Categories: Adobe Flex

Highlights from Adobe CF & Flex User Group Tour – San Antonio

June 23rd, 2009 No comments

Terry Ryan, Adobe Platform Evangelist

I just returned tonight from the Alamo Area Cold Fusion Users Group special event hosting Terry Ryan, Adobe platform evangelist.  Terry gave a great overview covering the new Flex 4 enhancements, Spark,  Flash Catalyst, Centaur, and Bolt.  Unfortunately we ran short on time and did not get very far into Flex Builder Flash Builder 4.0, but the group consisted mostly of Cold Fusion centric developers and Terry appropriately tailored the discussion to focus on their interests.  Personally, not being a CG guy, I would have preferred much more in depth discussion on Flex 4 and Flash Builder 4, but I did get to see some really cool demos on what capabilities are coming soon and the strategic direction and logic behind the Flex 4 changes.


Some of the key highlights for Flex that I noted are listed below …


Bidirectional (Two-way) data binding expressions

The data binding capabilities in Flex 3  are limited to one-way directional binding, Flex 4 will provide a new syntax for data binding expressions that you want to be bidirectional or two-way.  Simply adding the ‘@’ symbol at the beginning of the binding expression turns it into a two-way binding expression.

@{bindable_property}

In the example below we will define the text properties of two text input components with an in-line tw0-way binding expression that will keep the text value of these two components in sync.

  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:TextInput id="t1" text="@{t2.text}"/>
      <mx:TextInput id="t2"/>
  </mx:Application>


Additionally if you prefer using the binding  <mx:Binding> tag in your MXML, there is a new twoWay property that also allows you to define the two-way binding expression .

  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:TextInput id="t1"/>
      <mx:TextInput id="t2"/>
      <mx:Binding source="t1.text" destination="t2.text" twoWay="true" />
  </mx:Application>

More information on the two-way binding expressions can be found here:
http://opensource.adobe.com/wiki/display/flexsdk/Two-way+Data+Binding


Advanced CSS

css_terminologyAdobe has significantly enhanced the CSS support for Flex 4 applications.  These enhancements include Multiple class selectors, ID selectors,  descendant selectors, pseudo (state) selectors.

For detailed information on these new additions, please see the Adobe specification:

CSS Advanced Selectors - Functional and Design Specification


Here is a great presentation overview video covering the new CSS enhancements.

FlashCamp San Francisco: Advanced CSS in Flex 4






Enhanced States Syntax / In-line State Syntax

A new way to more cleanly manage component changes across state changes.  In Flex 3 this could create quite ugly code because ever change to a state required a series of mx:SetProperty, mx:AddChild, and mx:RemoveChild tags for each component property in each state.   This could quickly get out of hand and in practice, it made the states mechanism less desirable to use and manage.

Here are Adobe’s code examples:

This is the the Flex 2/3 method of defining states and component changes in states:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:states>
        <mx:State name="newCheckbox">
            <mx:AddChild relativeTo="{vbox}">
                <mx:CheckBox id="checkbox" label="Checkbox" />
            </mx:AddChild>
        </mx:State>
        <mx:State name="newTextArea" basedOn="newCheckBox">
            <mx:AddChild relativeTo="{vbox}">
                <mx:TextArea id="textarea" />
            </mx:AddChild>
        </mx:State>
    </mx:states>
    <mx:VBox id="vbox">
            <mx:Button label="Click" click="currentState='newCheckbox'" />
            <mx:Button label="Click" click="currentState='newTextArea'" />
    </mx:VBox>
</mx:Application>


Now this exact same example refactored to use the new Flex 4 in-line state syntax:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="library:ns.adobe.com/flex/halo"
   xmlns:m="http://ns.adobe.com/mxml/2009" layout="absolute">
    <m:states>
        <m:State name="default"/>
        <m:State name="newCheckbox"/>
        <m:State name="newTextArea"/>
    </m:states>
    <mx:VBox>
        <mx:Button label="Click" click="currentState='newCheckbox'" />
        <mx:Button label="Click" click="currentState='newTextArea'" />
        <mx:CheckBox id="checkbox" label="Checkbox" includeIn="newCheckbox, newTextArea"/>
        <mx:TextArea id="textarea" includeIn="newTextArea"/>
    </mx:VBox>
</mx:Application>


Additionally you can define state specific properties and event handlers using this in-line syntax:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="library:ns.adobe.com/flex/halo"
   xmlns:m="http://ns.adobe.com/mxml/2009" layout="absolute">
    <m:states>
        <m:State name="disabledState"/>
        <m:State name="enabledState"/>
    </m:states>
    <mx:HBox>
        <mx:Button id="button" label="Enable" label.enabledState="Disable"
            click="currentState='enabled'"
            click.enabledState="currentState=''" />
        <mx:TextInput enabled="false" enabled.enabledState="true"
             text="example text" />
    </mx:HBox>
</mx:Application>


For more information on the new in line state syntax please see the
Enhanced States Syntax – Functional and Design Specification


Primitive Graphic Shape Components

The Flex 4 FXG, code named Gumbo, provides new primitive graphic components including rectangles, ellipses, lines, and Path.  This is primarily in support of the new Flash Catalyst tool-set that intended to better separate the designer goals from the programming implementation.  Nevertheless, these primitive graphic components are a welcome addition that will help make creating simple onscreen graphic and composite controls much easier.

More information here:
http://livedocs.adobe.com/flex/gumbo/html/WS145DAB0B-A958-423f-8A01-12B679BA0CC7.html


Text Engine (requires Flash Player 10)

Finally the major new feature I have been waiting for is the new FP10 text engine support.  Flex 4 text based components make use of the new text engine provided by Flash Payer v10.  I have not  had a chance yet to explore this new feature-set, so I will be digging into it soon and posting more info.

Terry demoed the New York Times Reader Adobe Air application and shows some of the new impressive capabilities of the new text engine.

I am more interested in the right-to-left (RTL) support added to properly support internationalized applications in RTL languages such as Hebrew and Arabic.

For those stuck in Flex 3, I know there is a Text Layout Framework provided to make use of the new Adove Flash Player 10 text engine.  Here are a couple of reference documents on this framework:


Categories: Adobe Flex

Special Event!! Adobe CF & Flex User Group Tour, hosted by the Alamo Area CFUG

June 14th, 2009 No comments

Mark your calendars for June 23rd!

The Adobe CF & Flex User Group Tour hits San Antonio’s Alamo Area CFUG

Tour Event: San Antonio Adobe CF & Flex User Group Tour Stop, hosted by the Alamo Area CFUG
Date & Time: June 23, 2009 from 6:30pm – 8:30pm
Address: 13330 Kyle Seale Pkwy San Antonio, TX 78249  google map





Come join the Alamo Area ColdFusion User Group at the Igo Branch of the San Antonio Public Library for a special event. Adobe’s Terry Ryan (Platform Evangelist) will be showing us the next version of ColdFusion, the new ColdFusion IDE, ColdFusion Builder, the Flex Framework and some great things to come in the next product releases.  He’ll also show us the new features and products focused around the Flash Platform including Flash Catalyst (formerly known as Thermo) and Flash Builder (formerly known as Flex Builder).  We have $2100 software to give away as well as other great prizes.  As always, we’ll have food, drinks lots of fun.


RSVP  here:   http://www.meetup.com/AlamoCFUG/calendar/10633189/

More Info:  http://groups.adobe.com/posts/8ba40b304c


Categories: Adobe Flex

San Antonio RIA User Group!

June 14th, 2009 No comments

sa-ria

saria

If you live in the San Antonio area and are a Flex/AS3 developer and are looking for similar species of your kind, then check out the San Antonio RIA User Group.  This is a local group that meets once a month to proliferate the gospel of Rich Internet Application development with a primary focus on Flex/ActionScript development.

Website:  http://riausergroupsa.wordpress.com/


The first meeting I attented (in April, 2009) provided some helpful background information on the underlying ActionScript evolutionary path and the fundamentals of the ActionalScript eventing model.   Future meeting will delve into further Flex development patterns, third-party frameworks, and open discussions on modern  software engineering practices.


Categories: Adobe Flex

Spring BlazeDS Integration 1.0.0 Released

June 13th, 2009 No comments

spring-source

Whoohoo!

The first GA release of Spring BlazeDS Integration, the open source solution for building Spring-powered RIAs with Adobe Flex was announced on June 10, 2009.

>>> Release Announcement


For those Flex developers out there that are integrating with BlazeDS, this project provides some heavy lifting especially if you are already using the Spring Framework and Spring Security on your back-end Java server.   I started a large project using BlazeDS some time ago and I wish this Spring BlazeDS had been available back when I started, there were so many challenges that I had to resolve using dreaded extended custom implementations of certain BlazeDS classes.  We have since retrofitted and adopted this Spring BlazeDS integration project and it has greatly simplified some of the complexities previously encountered and streamlined the BlazeDS configuration of remote service destinations.   I just wish this project had come along much sooner, it would have saved us a lot of time :-)


Make sure to check out the Team Blog for examples and integration pointers!

>>> Team Blog


Categories: Adobe Flex