Update: You can download the source code for this screencast here.
Recently Bruce Eckel and I had the chance to record a screencast of us pair programming with Flex & TurboGears:
http://www.adobe.com/devnet/flex/articles/eckel_video.html
The results were great – a fantastic UI on top of a simple back-end! Both Bruce and I learned a lot creating this screencast and I hope you will enjoy watching it.


15 Comments
I enjoyed watching you both. Having two people was nice in that it gives the screencast a more programmer-explaining-to-programmer feel rather than a lecture.
Couple comments:
* Consider upgrading to TG 1.0
* In Vim, you can “:set ts=4″ to get the indent working correctly
* { is a brace
* {foo:”bar”} is object literal notation for ECMAScript. They’re not quite the same as python dicts because the keys (identifiers) have to be strings.
Err, correction. The vim line is “:set sw=4″ (shiftwidth rather than tabstop), though both would probably work.
Thanks Karl! Glad you enjoyed it! Will you be at the TurboGears Jam next week? Both Bruce and I will be there. Maybe we will record another one. :)
It was simply stunning. I personnaly like the simplicity of TG as compared to say Struts + Tomcat. I was seeing Flex for the first time and it was impressive. You would have to learn some amout of javascript and CCS before you can achieve the same using TG widgets with Kid.
Thanks for this tutorial – I really appreciate it as a new Flex developer. What I particularly liked was Bruce asking the same questions I had – as a Flex newbie. Often PR-department ‘tutorials’ gloss over some of the grittier details.
I would love it if you guys could get together and make another screencast, this time using more than one table and some more advanced Flex functions, like charting. Integrity constraints and table relationships are unclear to me currently.
Thanks Neil. I’m glad it was helpful. Bruce and I are working on others like this one. You may also want to check out the Total Training DVD for Flex. I have heard many people rave about it.
Thanks for the share. I will definitely look into the tutorials and widgets provided for Adobe Flex, especially considering the program is now open source!
James,
Excellent video on TurboGears and Flex! I am excited to try it out; but where is the source for the demo? At the end of the video you said it would be posted on http://www.jamesward.org I just spent an hour looking all over the site and cannot find it. I did have fun looking around your site, but it would be nice to get the source to play with.
Thanks,
Rick
Hi Rick,
Sorry for the delay. The source code has been posted on the original post (above). Let me know if you have any problems.
-James
Hi James,
Thanks for the TurboGears/Flex code – it works great. I am considering coming to the Jam in Crested Butte in February and was wondering: the event description says that attendees will get a free Flex License with paid registration – do you know if this includes charting?
I am very interested in using the charting components and developing some custom charting components.
Thanks again,
Rick
Hi Rick,
The Flex Builder license will be for the regular Flex Builder 2 without Charting. Sorry. I hope you can go!
-James
Hi, I am trying to hook up TG and FLEX and found the video tutorial pretty helpful. But when I download the code on my MacBook Pro (Flex Pro 3), it doesn’t work! It does not even show me an error!
So I opened the code on my FLEX on PC and it works perfect. Obviously, I imported the project correctly and added as3corelib.swc but there is some issue with Flex mac. Any comments?
Hi Vishal. Is it possible that there is an error on your Mac but that you aren’t seeing it because you don’t have the debug player? Is the problem at compile time or runtime?
Hi James,
There is no error at all, at compile time and run time. I just reinstalled Flex3, but it still doesn’t work. In fact, I tried adding Alert messages to see what my raw json string looks like, but it doesn’t show the alert box. But it works perfectly fine on windows.
Thanks,
Vishal
Hi Vishal,
Can you export the project and email it to me? james at jamesward dot com
Thanks.
One Trackback
[...] Using Flex for rich widgets in TurboGears applications is a great combination of technologies. You get two great programming models and seamless interaction with both the FABridge and with TurboGears’s JSON support. A few months ago Bruce Eckel and I recorded a screencast of us building an application with a Flex front-end and a TurboGears back-end. The application we built used JSON to expose the TurboGears back-end to Flex. We had really great success with this approach. At CodeMash we took another approach and used the FABridge to pass objects from TurboGears to a Flex application. Both approaches work really well and depending on what you are building, one may be more applicable than another. [...]