Monday, June 2, 2008

Flex Inline function & Flex Cookbook

It's cool to see a Flex Cookbook out there for new coders to leverage knowledge and skills of more experiences developers.

I was a bit surprised by the top rated recipe How to Pass Additional parameters to event listener using ActionScript for reason it uses an inline function to add additional information to standard event. I do think this is an innovative way of passing additional data. After saying that I don't think it is away I would recommend to any developer to use. Since it goes against good programmer practices of creating maintainable code. Key reason is that you have no way of removing this function from an event listener (unless you do another hack to get it's name at runtime). The second key reason why I think this is bad practice is that creating your own event is just as easy. So I don't see any major benefit other than obfuscating the code.

No comments: