360 Flex San Jose Recap
I am back in Chicago after a red-eye from San Jose this morning where I was attending 360 Flex. 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.
Thanks,
Labriola



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... ;)
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.
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,
glenn
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!
Glenn,
First, you can find me (and the slides for this preso @ http://blogs.digitalprimates.net/codeSlinger/index...
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.
Mike
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
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. ;-)
thanks.
keeps it coming!