• cf.objective() 2008 Sunday Sessions

    The crew over at cf.objective() 2008 has posted the Sunday sessions. Apparently, a lot of people have signed up for my session, so I was nominated for a repeat Sunday timeslot. I just booked my flight today, so I was able to account for the extra time at the conference.

    I had a very interesting chat with Chris Scott this evening about his upcoming Swiz framework. There’s a story in here somewhere.

    Chris and I both worked on AOP/IoC frameworks for ColdFusion some years back. I got a bit of a headstart on Chris, but got frustrated with the inability to compile CF code without writing it to the file system first (I decided to wait until CF 7 when CFCs were first-class Java objects so I could use CGLIB to compile them on the fly like Spring does to Java classes). Chris didn’t have a problem with this workaround, and went on to fame and glory as a creator of ColdSpring. (To be clear, I never would have finished my IoC framework for CF anyway since I never actually finish any of my hobby work. :) )

    Now it seems like we have crossed the same intellectual paths again, since Chris’s Swiz framework for Flex implements an IoC container akin to the work I have been doing recently on IoC utility classes for Flex. Based upon tonight’s chat, it seems that Chris has come up with very mature solution with autowiring using metadata. I’m hoping to get some code from him tomorrow.

    In my experience, when multiple people arrive at similar solutions with no contact between each other ahead of time, that means a good solution has been found. We both went with MXML as the configuration file format, since Flex parses it naturally with no work required. It’s nice to see some consistency in approach there. Chris also wanted to include some classes to handle the Command pattern and chaining commands, but I pointed him at Joe Berkovitz’s excellent resource for MVCS (also a cornerstone of my presentation).

    Since IoC is a really clean pattern for Flex, and a cornerstone of my presentation at cf.objective(), and Chris has what appears to be a nice clean solution, I may actually port my code sample for the preso over to Swiz. Also, not being one to reinvent the wheel, I’m really interested in contributing to Swiz if the opportunity comes my way. Apparently, Swiz doesn’t have AOP yet, and I have a basic interceptor working already, as well as a Prototype implementation for the IoC container (which Swiz might have – we didn’t cover it in our chat). As Chris pointed out on our chat, there are not many use cases for AOP in Flex, although I got a basic authentication example working to wrap a Controller’s method from unauthorized access, and it worked beautifully. I imagine AOP will be no less useful in Swiz/Flex than it is in Spring/Java, so maybe I’ll contribute this piece if Chris doesn’t get to it first.

    If you’re going to be at cf.objective(), make sure you keep an eye out for Chris and take a look at what he has cooking. Finally, we’re both going to be on the CFWeekly podcast tomorrow night debating Flex frameworks, so keep an ear out for that in the upcoming couple of days.

    Category: Uncategorized | Tags: