Enterprise Software

Flash and Flex: cached and componentised

Mike Potter is the developer marketing manager for Flex, we sat down with Mike at MAX and discussed where Flex and Flash is heading.

Mike Potter is the developer marketing manager for Flex, we sat down with Mike at MAX and discussed where Flex and Flash is heading.

Builder AU: What's new in the Beta 2 release of Flex 3?

Potter: There are a number of bug fixes to the components for the Flex 3 SDK, there are a couple of new components in the SDK or in the framework itself — there's an advanced data grid for instance. Some enhancements to the charting components as well, there's also now profiling and debugging tools that are available in Flex 3 professional, and we've also included database accessors, so we can easily create a CRUD based application that's hooking into a PHP or ASP .NET backed application. Not just the ColdFusion integration that we had in Flex 2.

So we're looking at releasing Flex 3 in early 2008.

Could you tell us about the new profiling tool in Flex Builder?

So you're going to be able to find out where in your application, where things are slowing down in your application. You're going to be able to see exactly what's using up most of the memory, what's taking most of the time in terms of the process time and really dig into your application to find out what the slow down is and be able to fix those problems easily.

Have any workflow improvements been made?

There are some improvements, in the wizard now when you're creating a new Flex project you can actually just choose your deployment options. You can say I'm going to deploy this in Flash Player or I can deploy this to the desktop using Adobe AIR.

So historically you've had to create separate projects. Your Flex project, your AIR projects. Now the same project — you just change the deployment options which is really very powerful from an AIR developer perspective to be able to just, or from a Flex developer perspective to be able to choose the desired runtime without having to change any of your code is really extremely powerful and a number of companies, most of the applications we're seeing developed with AIR these days are running on Flex.

So eBay's written a Flex application, Pownce is running a Flex based AIR application, a lot of the really great AIR applications are being built with Flex these days.

Is it possible to turn an AIR project into a Flex project?

What we're seeing most people do is actually go from the browser to the desktop so that they're taking their existing browser based code and then just deploying that as a desktop application.

Obviously AIR gives you additional APIs like accessing the local file system, working offline, synchronising the information — but at the basics you can take the same UI code and run it inside the browser or outside the browser in Adobe AIR without changing a line of code at all.

Can you explain the persistent framework caching that will be added to Flash Player?

So historically with Flex 2, the Flex framework itself is a certain size and every application, whether or not you use the entire set of components in Flex, is including that framework inside of it. And that framework, as you build more and more applications, becomes a burden for people; they have it already on their computer in other applications that have been built.

So what the new Flash Player allows you to do is actually cache the framework locally which is going to reduce the size of your SWF file, your outputted Flash file or Flex application, and then allow that application to load faster and appear to the user in a really quick amount of time.

So presumably the runtime will already need to be on the user's machine?

So once you hit any Flex application if you've [subscribed] to the latest version of the Flash Player it's going to automatically cache that file for you. And the end user doesn't need to do anything, they don't need to configure anything like that [uh huh], it's going to happen automatically.

The developer can add some code that's going to allow them to optionally call in the framework if it's not there [oh right], but the SWF itself should be a smaller size that's going to load faster.

How does the Flex to Ajax bridge that is now incorporated into the Flex SDK help?

We've seen a lot of companies use that type of bridge in really great applications. The Google Finance site is a good application that's using Flash to display graphing information of charting data for stock prices with HTML to display the information and the rest of the text for the news items, and information about the company.

HTML works really well for displaying that type of information on a Web page and what the bridge allows you to do is to connect that HTML information, or you've JavaScript on that page to your Flex application, so the two can start interacting.

Having it part of the SDK without requiring another download just makes that transition or integration a lot easier for developers, and so we're expecting to see a lot more incremental use of Flex.

Historically if you were building a Flex application you really had to build almost your entire application in Flex and with the bridge what it allows you to do is just add incremental aspect of Flex to your application and start to get a feel for what it's like to develop a Flex application and where you can add it inside your existing Web sites.

Typically though, Flex would be used as part of a site, a configurator for example, rather than constructing the whole site in Flex.

Right, and there are some companies building online applications in Flex. Nike.com uses Flash throughout their whole Web site for instance, but mostly what you're seeing is use of Flex inside existing Web infrastructure because companies have already built out all this Web site and this infrastructure already that they want to incrementally add Flex, that Ajax bridge is going to allow them to do that a lot easier than what they are able to.

Flash Player 9 is needed to deploy Flex applications. Most organisations wouldn't typically rush to the latest version of a browser plug-in, are these barriers breaking down?

I definitely think that they're breaking down, the player itself contains code that allows it to automatically upgrade to the latest version without having to go to another Web site, you don't need to go to Adobe.com you can upgrade right inline and so the fact that people are so easily able to upgrade Flash Player and the Flash Player team has kept backwards compatibility so no one really worries about upgrading Flash Player.

If you se that dialog pop up, pretty much everyone is upgrading. I think now 93 percent adoption of Flash Player 9 within 12 months. Most of the people on the Internet right now can view Flex applications and that worry is really going away.

What the new features in the advanced Datagrid?

The basic DataGrid that Flex 2 had was certainly a lot more powerful than any normal HTML control or HTML table. You were able to sort it, resize the columns, inline editing and stuff like that.

What we found was that companies were really wanting to extend that and add in maybe indenting, for instance, all of the information. And so the Advanced DataGrid has a number of new features that companies have been requesting and it's part of the new SDK for Flex 3.

What are some of the new wizards in Flex Builder?

There are new wizards for connecting to your databases, it'll automatically generate PHP code for connecting back to a MySQL database or ASP .NET to connect back to a Microsoft database.

That code generates a CRUD based application, you would then take that application and customise it for whatever you like, but at least the underlying Flex code is there and also the underlying PHP or ASP .NET code has also been generated.

Are all the original benefits still available in LiveCycle Data Services like messaging?

The really good part about LiveCycle is not just the Data Services, as a service now all of the services from LiveCycle are exposed to Flex developers. So if you wanted to integrate PDF documents and workflow and anything like that into your Flex or Rich Internet Application you're now able to do that and access all of the LiveCycle services from AMF endpoints or just XML Web services.

Editor's Picks

Free Newsletters, In your Inbox