Revisiting one of my first RIAs

I spent some time updating on of my *first* RIAs today.


The application allows special needs teachers to create IEPs (Individual Education Plans) for students. The teachers fill out various (20+) forms that compose the students’ IEPs.

During the initial interviews, it was identified that the forms would be revised annually and new forms would be added. Dynamically generated forms were *beyond* the project’s scope, so some easy-to-update forms were needed.

So back today, it’s always fun going back to revisit old code. I got a kick out of looking back at the approach taken on the RIA, hence this post. I wouldn’t necessarily recommend this “architecture” but it did make my job today extremely easy/fast to add some new forms & update some existing forms.

The Architecture

  • The teachers fill out their forms in a MDI Flex interface.
  • Form data is persisted for subsequent use.
  • All forms where mapped to Flex Accordion controls for a consistent user experience.
  • PDFs forms are utilized for printing.
  • I created a Flex component based on MX:Accordian. This component exposes a function ‘getData’ that when called recursively extracts data the user had entered in the form. This includes any data entered in datagrids, combo boxes, etc. The data is returned as a loosely typed ActionScript object.

    The object graph is sent to PHP via AMFPHP and persisted in MySQL via a PHP “ORM” class that can persist (& reconstruct) any PHP object graph. The object graph is not serialized rather, a modified preorder tree traversal algorithm is used. This provides for simple SQL queries, when / if needed.

    On the PDF form the form field is simply set to the desired attribute name of the object graph.

    So today, to add any form fields, I simply drop on an input (textbox for example), give that input an id and set the text property using databinding. (eg. id=”iep_firstName” text=”{dp.iep_firstName}”).

    That’s it.

    The new field will be persisted with no other work required 🙂 The field can be added to the PDF should the field need to be printed.

    We have 8 Million+ records to date, and things seem to be scaling well.

    Leave a Reply

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