25. May 2011

ColorPicker and DateField in Flex 4.5

ColorPicker is not available in Flex 4.5 with Spark architecture. I found this problem while I was migrating desktop project to mobile AIR for Android.

Fortunately there is solution. Alex Harui wrote simple Spark based components that replace ColorPicker and DataField functionality.

Update: Unfortunetely swatch DropDown component does not work in mobile world. You could not select color from swatch. This problem is bounded to DropDown/ComboBox problem in mobile world. I recieved recommendation from Adobe developers to move DropDown part to new view state and avoid using s:DropDown.

Please drop a comment to this post if you have working mobile colorpicker component.

4. December 2010

Spark vs. MX – size of Flex application

I’m building several applications based on newer Flex/Spark architecture. It is good practice to keep application at minimal size. With Spark architecture I hit several problems.

One critical problem is that application with Spark is quite big. I decided to enable support for RSL…

There is problem that RSL is available only for official releases of Flex SDK. You can run aplication on developer’s machine, but user will see some fancy errors.

There is another problem with Adobe’s RSL. Browser will contact Adobe server before application start. You could see 3-5 connections. Flash Player is checking version of RSL. This will slow down start of application. It could take 10 seconds in network with higher latency. That is very bad.

Therefore only viable solution is to turn off RSL and use “Merge into code”.

Folks who advocate for Spark says that it is much more efficient and it has better structure. Sure, it’s true. You can do many things with Spark much easier than with MX.

I was wondering why were my applications with Spark that big. I made small reasearch. You can see comparison between MX, Spark and MX+Spark projects on followich chart. In the first step I was testing only size of application with just one Button in Release mode. Then I’ve added some other components and application starts growing.

[kml_flashembed movie=”/wp-content/flex/flex-size/FlexSize.swf” height=”500″ width=”500″ fversion=”10.1″]

Measured against Flex SDK

The last result with Spark is very sad, because Spark application with Button, DataGrid, FormItem and TextInput is two times bigger than application using MX.

Do you know about any way how to shrink Spark applications?

  • Where’s the fish?

  • Translations

  • Further info

  • Twitter

    Follow @jurajmichalek on twitter.

  • Comments

  • Tags

  • Topics