Archive for Flex SDK

Simple Flash CS4-style Docking in Flex

Inspired by Degrafa, I spent couple of days to build a quick docking manager. It can add any component/containers into the list dynamically.

Full source code download here.

My working project with this docking manager:

AIR Mac-only Crashes

The team I recently working with mainly developing AIR application on Windows Vista, our designers using Macs though. AIR can be run both on Windows and Mac, but we experienced several Mac-only crashes.

We have several Flex developers, I have to use some of my time review code for other developers even rewriting some of buggy code. The designer working on Flex Builder for skinning will run the application on his Mac a few days a month, until he ran Flex Builder we knew the application got crash on Mac. I had to use several hours to find and fix the problem. A month and more later he opened his FB again and the application crash again.

Crash Reasons?

Totally three Mac-only crashes I fixed. Now I work remotely at home and using my own Macbook so there will no more ‘silent’ Mac-only crash will happen. Here’s reasons I found which caused Mac-only crashes:

  • SQLite database object AMF3 deserialization, in a special case of object serialized with a single object to be stored several times into database table.
  • A fault application menu was added.
  • SQLite database, a write transaction was added into a function which has several read transactions running in parallel. Also, it seems several ‘select all’ read transactions at the same time cause occasionally crash as well.

Avoid Mac-only Crashes

  • If application need to be run on Mac, have at least one developer working on Mac. Fixing a Mac-only bug after several weeks is hard than regular bugs. For agile development, bug should be find as soon as possible, if a month later find application cannot be run on Mac, a senior developer have to use at least several hours if unlucky.
  • Be careful when working on SQLite database. The first crash was because of an unsafe usage of reference, reuse a single object reference sometime cause unknown issues like this; for 3rd crash, although SQLite can have a single write transaction to be run at the same time of several read transactions, as ‘writer’ will wait for an exclusive lock until all ‘readers’ complete, SQLite engine inside AIR might not handler it correctly, at least on Mac.

Usability is so Important, Please

I got a hard time to realize a team to develop a large RIA desktop application, not only myself should understand how important usability is, but also other team members even juniors and bosses.

New Feature Requests

We all understand application development change very often. It happens for every team, bosses will add new features never discussed before and marked as ‘very important’. Problem is, for a desktop application, new features usually means redesign at least some parts of UI, also can break user experience if no enough usability discussion and clearly understand what user will expect (which very often is different with the new feature defined), not only designer but also developer have to change a lot. For example, add some new feature without enough space on UI, new behavior in one component which UI should update other relative components at the same time. Not only we need time for new features, bad definition can result arguments between team members and boss, which actually conflict between what boss expect and what user expect in real application.

Designer and Usability

Designers has a good feeling of usability, problem is designers not the person produce the application, and usually designers can design single UI but not the running UI, so it quite often developers have to feedback some design problems. For me I will try to discuss thoroughly before write code, understand what designers want and what will happen in real application that can affect user experiences. Discussion of user experiences between designer and developer should be as early as possible.

Also, designer have to test application from time to time, to find usability problem early and try to fix it.

Junior Developer and Usability

Juniors usually need time to learn and get improved, thinking about usability also hard for them. Problem is user experience is about whole application not parts which experienced developers working on, without fix major usability problems, application can never give anybody good user experiences. Try to ask new developers to catch up more tasks than what they can without fix enough usability problem, is a disaster for the whole application sadly.