Adobe announces Flex 4 SDK, codename Gumbo

A couple of days ago I discovered that the changes for new Flex 4 SDK are already being released. So of course I had to take a look to see what they are up to. You can also view the presentation of Matt Chotin at http://flexorg.wip3.adobe.com/gumbo/gumboplan.htm.

Things I saw and heard that were very interesting are for example the 2-way binding. This is something Flex developers have been craving for since Flex 2.Not that it was/is impossible to do, but the ease of implementing 1-way data binding is in huge contrast to the complexity of implementing it both ways. For the 1-way binding you can just use the curly braces, pointing to a bindable data component. However, if you want it both ways, there are a couple of ways of doing this.

First of all there is the <mx:Binding> tag that you can set in addition to the use of curly braces. So you would set the curly braces in the component definitions to provide the data-to-screen binding. Then you’d set the <mx:Binding> tag for doing the screen-to-data binding. Of course you can also do both ways using the <mx:Binding> tag too. And you can even set it using Actionscript instead of putting it into an mxml file. One caveat though: the order in which you set the binding can be important, because in some cases it may cause your data to be cleared, because screen data is put into the data that has been transferred from some other component and your data is being erased.

The second way of doing 3-way binding is not really a good one, but can be applied in some smaller components. In this case you would just take the matter into your own hands and you would have to programmatically make sure the binding works by writing the code for it yourself in Actionscript. I would strongly advise not to use this, because mistakes are easily made in this way.

However, Flex 4 SDK is now promising a better way of implementing the 2-way binding. Unfortunately, they are just teasing for now, so I don’t have a clue as to how they are planning to do this. But it’s something to look forward to.

Another promising thing to expect from the new SDK is the improved interaction between the different Adobe products. They want to include the designer more into the development process. For this they are also elaborating on the FXG file format. It will provide the possibility to work with the same file in different products and it will be able to take advantage of the Flash Player 10 capabilities.

I can’t help but think that this is a direct response to the XAML and Expression Suite Microsoft are now promoting very hard. Not that it’s a bad thing. Certainly not. I’m happy to see that this is happening, because the competition between Adobe and Microsoft in this area might actually be good thing. It might cause the development tools to evolve more rapidly into new exiting tools, making the lives of developers and designers a little bit more complicated. I would like to say “easy”, but my gut feeling says it won’t be, because rapidly evolving tools are prone to have bugs and are likely not or less backwards compatible, leaving the developers with headaches when trying to port their program to a newer version.

The third major change I’m seeing here in the new SDK would be the use of view states. It’s completely different than it is in the current version. It’s becoming more simple though, but unfortunately it will probably mean rewriting the existing code when trying to port to the new SDK. I will certainly try this one out once I can get my hands on an alpha or beta release later this year.

Now, what exactly will be changing? Well, right now, we’re writing view states this way:

<mx:states>

<mx:State name=”stateName”>

<mx:AddChild position=”lastChild”>

<mx:SomeComponent/>

</mx:AddChild>

<mx:RemoveChild target=”{someOtherComponent}”/>

</mx:State>

</mx:states>

<mx:VBox>

<mx:SomeComponent id=”someOtherComponent”>

</mx:VBox>

The new way of doing the same thing would be something like this:

<mx:states>

<mx:State name=”stateName”>

<mx:states>

<mx:VBox>

<mx:SomeComponent excludeFrom=”stateName”/>

<mx:SomeComponent includeIn=”stateName”/>

</mx:VBox>

As you can see, this saves us some lines of code and makes it a little easier to place the components in different states in the proper position. The drawback is that all the stats are mingled together, which could make it more difficult to read. But hey, that’s just the problem of getting used to it, so it shouldn’t pose any problems.

This gives you an idea of what is to come. Of course there’s more, like layouts and other cool stuff. So if you would like to read more about this, you can go to the open source website of adobe (http://opensource.adobe.com/wiki/display/flexsdk/Gumbo). As soon as I’m able to test some things, I will post it here also.

Share
back

One comment

  1. [...] – bookmarked by 1 members originally found by ralphiech on 2008-09-17 Adobe announces Flex 4 SDK, codename Gumbo http://blog.multimediacollege.be/2008/07/adobe-announces-flex-4-sdk-codename-gumbo/ – bookmarked [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*