Hi all,

I've developed a number of Flex projects in the past few months, but 
as I started to make bigger ones, I've run into a lot of problems.  I 
went back through a hands-on tutorial I had taken that was hosted by 
Matt Boles at MAX, and I think its time to move up to the advanced 
table.

But there's something fundamental I'm still missing.  Some background 
first - Matt basically ended the tutorial with showing us how to send 
a custom event up from a component to the main application, and 
passed to another component.  It wasn't until I put this in my own 
application that I finally understood the point behind needing to 
create loosely-coupled components.  I just did a google, and 
strangely enough, the PDF for this hands-on is found here:

http://www.ammug.org/drupal/system/files/Building+a+Rich+Internet+Appl
ication+with+Flex+2+and+ColdFusion.pdf

The example he gave was a rather simple one.  Make your CFC using the 
Flex wizard, and base your custom event off sending the wizard's 
object - i.e. in reality, only a single table's fields, because in 
the wizard, that's all you can create!

But typically, us developers need much more than that in order to 
view our data.  On to my question...


Lets say I have a contact list - this would require names (names 
tables) and a list of departments (dpts table), likely something 
like: where names.dptID = departments.dptID.  Using Matt's tutorial, 
I would create my CFCs by running the wizard on the Names table, make 
a "list all names" component and a "view selected name" component.  I 
would create a custom event object that would dispatch the name 
object, i.e. the selected name and fields from the names table -> to 
the "view selected" component, which would display the detailed data.


But what about the non-name tables that are directly related, like my 
list of departments (again: where name.dptID = departments.dptID)?  
My question is, since ALL names will have ONE department, should this 
SQL join be formed by editing the name object CFCs, and the name 
object then includes things like Department Name and Department 
Description every time its used - OR, should I have a completely 
separate department object that is dispatched additionaly when the 
selected name object is dispatched, which is in essence, forming the 
join inside Flex?

Considering that at some point the departments will be a separately 
edited item, with their own add/remove/edit, I'm assuming the 
latter?  And IF that's the case, what would the dispatch function 
look like on page 76 of the tutorial?


A long question - but typing it out helps me understand it, and I 
need to get over this small bump in order to move on.

Thanks for reading ;)

Reply via email to