Thursday, June 25, 2009

Flash Builder 4

The full release of Flash Builder 4 is scheduled sometime in July, replacing Flex Builder 3. I thought I'd take a look at what is different. Using the Modest Maps API I built a demo mapping application. I thought I'd post a brief snippet of that code. The first is the code in Flex 3:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
minWidth="1024" minHeight="768" creationComplete="init()">
<mx:Script>
<![CDATA[

import mx.core.UIComponent;
import com.modestmaps.TweenMap;
import com.modestmaps.mapproviders.OpenStreetMapProvider;
import com.modestmaps.geo.Location;

private function init():void
{
}
]]>
</mx:Script>
<mx:Canvas id="mappanel" width="100%" height="97%"/>

</mx:Application>

This second is the same code using Flash Builder 4:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024" minHeight="768" creationComplete="init()">
<fx:Script>
<![CDATA[

import mx.core.UIComponent;
import com.modestmaps.TweenMap;
import com.modestmaps.mapproviders.OpenStreetMapProvider;
import com.modestmaps.geo.Location;

private function init():void
{
}
]]>
</fx:Script>

<mx:Canvas id="mappanel" width="100%" height="97%"/>

</s:Application>

There are some interesting differences. I had expected to be able simply to extend my existing Flex 3 apps. Not so. I'll blog more on this when I have more time to poke around.

No comments: