Refactoring, Error #1065

I received the following runtime error in a flex project recently:

Error #1065 Variable package::Component_inlineComponent1 is not defined.

I was refactoring away from some static MXML to a dynamically loaded module. I had commented out the static MXML to test the dynamic module. Everything worked great. When I un-commented the previously working static module the #1065 error was thrown.

[Cache causing] Error #1065 Variable is not defined error.

Project -> Clean

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.

    Open Source ESBs… it's here !!

    I was excited to find an unexpected package on my doorstep last weekend. I had enrolled in Manning’s early access to Open Source ESBs quite a while ago (last year???). Well the books in print and I’ve got my copy in hand.

    I’m currently reading this book right now and loving it!!. I’ll make sure I update this post once I’ve finished the book.

    For those not familiar with ESBs (Enterprise Service Bus), suffice it to say the Enterprise Integration field is one of the most rewarding areas to be in software right now, IMHO.

    EI is full of architecture (which I love) so it’s a blast working in this field. Add data warehousing some RIA and you’ve got a snapshot of my past three months 🙂

    The Data Warehouse Toolkit

    I’ve read some really great books the past few months and thought I’d post a review.

    I’d highly recommend Ralph Kimball’s The Data Warehouse Toolkit.

    I’d normally opt for an architecture book over a [dry] database book without a second thought. Well I was pleasantly surprised to find this great resource.

    Kimball gives the reader a GREAT introduction to dimensional data modeling. For those ‘big picture’ developers out there, you owe to yourself to take a look at this work.

    I’ll leave the lengthy reviews to those more eloquent writes out there 🙂

    Two thumbs up.

    Pipes Source Code

    I’ve been heads down in development the past few months. During that time I’ve had numerous requests for the full source on the dynamically loaded modules ‘Pipes’ demo,MortgageApp.

    I *finally* had time to upload that source, simply use the ‘View Source’ on the demo to view the source.

    I’ve implemented a few enterprise RIAs using PureMVC pipes now. They work great, but I’m working on engineering (architecting) a new approach that I’ll post on the blog when it’s ready 🙂