My First Flex App

June 9, 20062 Comments

I completed version 1.0 of my first Adobe Flex app. All I can say is that when things work well, the app looks fantastic. When they don’t — you spend hours beating your head against a wall. There were a few things that I expected to hit simply because it was my first time developing in this environment. I knew I’d have to take my time learning the data types and new function syntax. The scripting language, Action Script, is actually similar to C, so it was pretty easy to get started. The form controls are easy to figure out and implement. Flex integrates well with XML and I was very comfortable using the data providers with XML data.

The positive side first. Flex integrates easily with Javascript and Web Services. Calling a C# web service was child’s play and it made me remember just how cumbersome hand-coding Ajax web service calls can be. The cool thing about Flex’s Javascript integration is that you could use Flex and Ajax on the same page, calling the Ajax functions from Flex and passing data back if you like. I used the Javascript integration heavily to display and edit HTML within iframes (more on this under the ‘negatives’). The Flex Builder design environment is very nice, although I recently started receiving a “this program will expire in x days” message. From what I’ve read, Flex Builder is expensive and I don’t know if an individual developer will have the ducats for this tool.

There were two major hurdles that I had to overcome during the development process:

  1. Flex doesn’t play well with HTML. This was a surprise since these apps are displayed in a browser.
  2. I wasn’t able to easily implement a data-aware, multiple-record form.

HTML and Flex are like oil and water. There are a couple of Flex controls that display HTML, but Flex performs a conversion on the data, mangling the code. Microsoft has mangled enough HTML with its tools, I was hoping that Adobe could avoid it, but Flex can’t even display an underlined hyperlink without some tweaking. I tried to implement a simple editor using the RTF control and a TextArea, but the results caused me to give up. I resorted to using the Javascript API and positioning iframes over the Flex application. This worked well in IE and then failed in FireFox. I found out that you have to set the “wmode” attribute to “transparent” or “opaque” in the setup of the Flash component or FireFox will not display the HTML over the Flex app. Working with HTML was a huge struggle and I’m severely disappointed that a web app has such poor support for HTML coding. I know I’m not the only developer having these issues since I saw several posts in the developer forums.

The other problem that I had was a combination of being new to the environment and expecting too much. I was really hoping that I could setup a form, point it to my data, and have it manage the records — similar to Microsoft Access. Don’t get me wrong, Flex has excellent data binding functionality, but the “MS Access” ease of use just isn’t there. I know I’m not expecting too much because I use PeopleSoft and have seen tools from Sybase that take data binding to that level.

So with my first app working, I still have some things to consider. Is Flex a good option in which to invest my time? I’ve seen some reports that Microsoft may be re-investing in a similar technology, looking to supplant Adobe. Is Ajax a better way to go? It’s harder to use, but more open. Lastly, can I afford it? This is a real question for someone who’s doing this type of work in his spare time. I’ll keep my options open, but at least I’ve found a tool that is closer to my idea of something that I should be using for app development in 2006.

P.S. — I learned a new tech abbreviation along the way. RIA – Rich Internet Application. I guess that’s what I’m after; getting back to 1997 when the GUI was rich and powerful.

Technorati Tags: , , , , ,

Share

2 Responses to “My First Flex App”

  1. Ht says:

    where’s the app?

  2. Shannon says:

    We are still fine-tuning the features. Hopefully I’ll have a release in August.

Leave a Reply

Twitter Tweet This