Flex Aspirations

As I’ve said, I’m starting to work with Adobe Flex 3 and I thought I’d start out the blog with a description of what I’d like to develop in the near future. I’m finding Flex to be what I’d always hoped Visual Basic would become. The features are well thought out with both the developers and the users in mind. Still, there are some things I think I can add.

I’ve already started working on some of these ideas but I’m hoping that this blog will make its way into the search engines quickly so I can get some feedback from other developers. Here’s what I’m working on.

The Grid Filter Bar

This is a component that sits above the header of a DataGrid and allows the user to filter the content of the grid based on what is typed into text boxes or selected from combo boxes above the headings. A text box would be used for fields that have many possible values. Where there are just a few possible values, a combo box or possibly a date field control would be loaded with unique values from the grid.

My first attempt works nicely but requires a lot of developer coding. It requires the controls to be defined in the program and manually linked to the grid columns. One benefit of using Flex is that controls can be very easily created at run-time. I’d like the next Grid Filter Bar to make use of an array of specifications and be generated on the fly.

But there’s more involved here that placing the filter controls above the grid columns and having them filter the grid contents. Grid columns can be moved and resized at run-time. The Grid Filter Bar has to adjust to these changes. It also has to account for columns that do not have filters and leave the appropriate sized blank spaces. Happily I got this to work as well but the next incarnation of the Grid Filter Bar has to maintain the original’s snappy response.

The XML Value Object

Most developers will have no problem understanding the concept of a value object. Simply, it is an object that efficiently stores quantities of data that other objects manipulate. Traditional value objects are designed to contain the equivalent of one data record’s worth of data. For example, the information about one employee or one order. So what happens if you need to maintain data in memory for 1000 employees? You need 1000 value objects and their associated overhead. If those 1000 employees were downloaded from a Web Service they would have to be converted from the download format, probably XML, to the 1000 value objects. This takes time.

Flex supports XML as a native data type and can even bind controls to the data. So, why not store the data in its native format and access it from there? You could minipulate the data as a collection of records or as individual records without moving the data one byte in the process! The only drawback is that you would have to know the XML syntax to use in your code. I want to create an XML Value Object that has a more developer friendly interface. It should operate more like a triditional database recordset and give the programmer certain advantages over a triditional value object.

For one thing, the fields within a triditional value object are hard-coded. If you need to add a new field, you have to update the value object code. Not so with XML. If you try to access data that doesn’t exist in the XML Value Object, it simply returns a null or predetermined default value. This means that field names can be fed to your application from another souce and no change of code is required if the other source has more or less data elements defined.

Chewy Data Bits

Way back when in my VB days, I created a set of controls that I called Chewy Data Bits in keeping with the GUI Gumdrops persona. These included a loose-leaf notebook container, various data entry controls and a sort of skinning I called Candy Wrappers. Each of these components are worthy of a blog entry of their own so I won’t go into much detail here. They were designed to provide a more natural user interface and be easier for non-geeks to use. Some of these controls were used to create the FamilyKeys program.

FamilyKeys is an application that people can use to record personal information to be referenced in case of emergency. There were sections to record your financial information, health information and inventory your personal property. It used the loose-leaf book metaphor to add an delete data and was very popular among non-PC savvy people. It was primarily given to customers by insurance companies as a freebie. If you’re familiar with FamilyKeys, please feel free to leave a comment leting me know how you like it.

I’m hoping to translate as much as is practical into Flex. Hopefully, I can make some improvements to the original designs. For example, I hope to provide animated page flipping with the loose-leaf control.

On with the show

So that’s where I’m heading with Flex. I think that most of what I expect to do is possible and practical. time will tell. Please stay tuned and stop back for more. I’d like to hear from other developers and get their views on my plans as well as their hopes and dreams with regards to their own Flex programming.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>