360 Flex San Jose Recap

I am back in Chicago after a red-eye from San Jose this
morning where I was attending 360
. It was yet another wonderful conference put on by Tom and John
featuring great presentation and fantastically inquisitive attendees. For my part,
I ended up doing two back to back sessions on Drag and Drop with AIR and a deep
dive into Flex Data Binding.

The AIR session was originally Jeff Tapper’s to do, but he
selflessly agreed to hang back when a client emergency kept him working during
conference hours. I did my best to fill in for him and hopefully the audience
gained some tips and tricks when moving between these technologies.

The data binding session is one I have been looking forward
to for quite some time. It is another of my ‘Flex from the Inside Out’ style
presentations where I attack a narrow topic and try to bring light to the
darkness. It seemed well received and the crowd seemed to very interested,
which makes it worth the effort.

The slides for both of these presentations can be found at SlideShare. The download URLs
for these presentations are as follows:

Please send any feedback you have so I can make
these better for the next time around.



    Heya Michael, I thought your Data Binding Deep Dive session was pretty cool, though it wasn’t what I was expecting (I’m not exactly sure *what* I was actually expecting…) 🙂

    I like your presentation style quite a bit. Your passion for what you’re presenting shines through and to people like me, that makes a huge difference… especially when hearing about technical stuff that’s a bit on the dry side. I think a number of folks don’t realize that those who have deep technical knowledge don’t automatically make great or interesting speakers. Likewise, those with dynamic personalities who have little subject knowledge aren’t automatically great speakers either.

    I think you’re a really good speaker with a lot of subject knowledge… basically, exactly the kind of speaker I like to listen to. Now, if you’d just do sessions on stuff that’s personally tailored to my interests… 😉

    Can you post the code for us to download?

    • by Tim
    • 6:08 pm, August 22, 2008

    Hi Michael

    your databinding talk was very valuable – i learnt how it works ‘under the hood’ which is so important acc to me when using/extending any framework. Thanks for sharing it with us.

    • by Vijay Agrawal
    • 1:08 pm, August 25, 2008

    Hi Michael,

    Just watched your presentation at 360flex on data binding and have to say it was very illuminating.

    just a quick question. (well i have 1000 but just one for now 😉

    when you spoke about models and making the whole class bindable.
    Am i correct in understanding that I’d get a performance benefit from making the properties of the class bindable one at a time rather than that whole class.

    is it’s correct that the complier will create a unique …..proportyChangeEvent name when I bind each property (so making it unnecessary, in this case anyway, to use a custom event name) and thus help with the problem you mentioned of having potentially 1000s of properties asking, as you put it, ‘is this for me..’?

    Is it the act of making classes rather than individual properties bindable that can cause a lot of the bottle-neck?

    please forgive me if I’m off track here, I think I’ll need a few runs through your presentation for a few of the more esoteric questions to show their total ramifications.

    Anyway, thanks once again for an extremely interesting and I have to say quite exciting presentation (the very fact I’ve just written that sentence surely says a lot about me and does worry me a little, maybe I should take up a sport! lol, )

    Thanks Michael,

    tinylion development UK

    PS – this needs a new book from you, with a lot more of the same. There’s really nothing out there covering these kind of topics from this perspective. put me down for a copy!

    • by Glenn Williams
    • 3:08 pm, August 27, 2008

    I answered Glenn’s question on Ted Patrick’s blog, but I am reposting it.


    First, you can find me (and the slides for this preso @ http://blogs.digitalprimates.net/codeSlinger/index.cfm/2008/8/20/360-Flex-San-Jose-Recap

    However, to answer your question:

    IMO, your absolute best bet is to define a custom event and dispatch it yourself for every property.

    Anytime you make something bindable, by default, it is going to dispatch a ‘propertyChange’ event with the name of the property that changed as a parameter. Every property in the class that is bindable will do this. Again by default, when you are using data binding every listener is listening for a ‘propertyChange’ event from that class.

    So, for example if I have a class with 5 properties and 5 labels bound to them. I then change 1 of the properties. 5 functions are called along with associated pushes onto the stack. 4 of them exit because the event was not for them, popping the stack, 1 of them proceeds. The issue, for me, is that there were an additional 4 method calls/stack pushes. Now, if I choose to update all 5 properties…. I actually call 25 methods, with 20 of them exiting after comparing the property name.

    If you define your own event names for each property, then you have a 1 to 1 correlation of properties being changed and listeners being called. (this of course uses my assumption of a single label bound to a single property, but all of these numbers get worse as you have more objects listening for changes) Now, there is some additional overhead at the player level for using multiple event names, however, it is my assertion that the function calls and associated pushes and pops are the bigger hit.

    I am not advocating that everyone stop using the default bindable generated code. Nor am I advocating that everyone must define every property manually. I am just saying that you need to understand this is a potential bottleneck and, when it is time to optimize an app, understand this is a great place to do it.


    Hi Michael, watched your Data Binding session, very informative.
    I have been struggling with the correct way to set up bindings in an ADG where some columns are elements in a collection within the row object. When the column is enabled for editing, the ADG is not designed to use custom setter function and also seems to lack the ability to use chains. I have managed to get a partial solution with custom renderers and custom itemEditEnd & itemEditBegin. I still have problems with the ADG sometimes reflecting old values and the whole approach feels like a hack. Is there a cleaner way using bindings ? Please feel free to contact me on my e-mail.

    regards Denis

    • by Denis Johnson
    • 4:08 am, August 29, 2008

    Thanks again Mike,

    I had no idea!

    I was assuming that each time a ‘propertChange’ event was created it would create a custom named event ‘propertyChange00n’ etc and make a 1 to 1 connection, not pass my property as a parameter.

    this is quite a shock.

    PS – i expect you at my office in an hour to help with a little bit of re-coding I have to do. 😉


    keeps it coming!

    • by Glenn Williams
    • 9:08 am, August 31, 2008

    I was assuming that each time a ‘propertChange’ event was created it would create a custom named event ‘propertyChange00n’ etc and make a 1 to 1 connection, not pass my property as a parameter.

    • by battery
    • 4:01 am, January 10, 2009

    Excellent presentation – thanks. You’re a natural speaker and I enjoyed the humor you brought to the subject.
    I really get your point about needing to dispatch custom events for each property in the model but I am struggling to translate that into real code. e.g. I have an ArrayCollection of custom value objects in my model. Where do I set the custom event? I’ve tried making the VO extend eventDispatcher and calling DispatchEvent(new Event(‘myCustomEvent’)) but that doesn’t seem to work when I am binding to the Array Collection.
    Would love to see the source code for the ModelLocator example you briefly show in the presentation – any chance of posting it somewhere. I’m sure that I wouldn’t be the only one to benefit from this.

    • by re-cycle
    • 10:01 am, January 29, 2009

    Just remember that dispatching those events is an optimization.

    So, you don’t need to do it yourself unless you are hitting a wall on performance. To answer your question though, if you have an ArrayCollection, you can dispatch an event when it is set, but the ArrayCollection itself is an event dispatcher, so it will manage the events by itself that need to propogate up when its children change. I will try to get some code posted for you soon.

    Thanks for the reply Michael.
    So, if I get my VO to dispatch a custom event and it is one of the elements of an ArrayCollection in the model locator, the Array Collection will take that custom event and broadcast it – is that right? I wasn’t sure if the Array Collection would just issue a standard Property Changed event if one of its children dispatches a custom one.
    I understand what you are saying about optimization but I’m working on a big project that I anticipate needing optimization and reckon it will be easier to build in these custom events at an early stage.
    Thanks again for the excellent presentation.

    • by re-cycle
    • 11:02 am, February 3, 2009

    For anyone still as confused as I have been, I did some testing on the ArrayCollection of VOs scenario and found that it works as long as the ArrayCollection is marked bindable with the custom event
    public var myData:ArrayCollection = new ArrayCollection();

    The VOs need to dispatch the custom event when their data is changed.
    Hoping this is a correct explanation Michael…

    • by re-cycle
    • 12:04 pm, April 7, 2009

    Your presentation about Drag n Drop in Air was very helpfull. Got almost every information i needed. But right now i’m stuck on a tricky problem:

    1. I add a costum clipboard format:
    cb = new Clipboard();
    cb.setData("AssetFormat", aArr);

    2. I start the Drag
    NativeDragManager.doDrag(iO, cb, bmd, null, ndo);

    3. Behind the scences i download a File

    4. If the download is done I wanna add the Clipboard another format
    cb.setData(ClipboardFormats.FILE_LIST_FORMAT, fArr);

    Now, how to tell the NativeDragManager to "update" when I add new data to the clipboard?
    If I Debug the NativeDragEvent.clipboard property in the DragUpdate Event all data is assignd, but the mousecursor do not allow me to drop it on the desktop.

    That’s a intressting one right? 🙂

    Best regards, Temo

    • by crazymind
    • 6:04 am, April 9, 2009

    Yes as soon as you use a custom event in the Bindable tag the compiler does not generate the dispatching code anymore. You have to implement yourself the check if the value is different and dispatch an Event with the given type.

    I’m trying to find the video of this presentation that was originally at brightcove.com. Just wondering if anyone have a link to it (it’s been removed from brightcove)? The slides just don’t do the presentation justice.

    Hi Mike
    Just one question. My models are normally just properties – no methods. If I dispatch custom events then I think I will need to create getters and setters so I have a place to dispatch the events. Is this the correct thing to do? Thank you.

    • by JimOtten
    • 12:02 am, February 16, 2010


    You need to think of implicit getters and setters being the same as properties here. That is what happens when you mark them bindable anyway