Earlier this year, I was made aware of a partnership between Stack Exchange and RunKeeper to install a Healthy button on the Fitness & Nutrition Stack Exchange site. As a member and moderator of the site, I thought it was an excellent idea to help promote good and healthy content to a fitness audience in addition to other major social media channels. RunKeeper made an official announcement on their blog about a month ago, and the button was officially unveiled on Stack Exchange. I thought that since it was such a neat idea that it would be great to also have it on the Fitness Stack Exchange blog.
Playing with JavaScript, Twitter Bootstrap, and Rails
Over the past few weeks, I had been playing around with various JavaScript frameworks namely node.js and backbone.js. I was trying to see if I could recreate my company’s web application (which is built on a Rails/Flex stack) entirely within a JavaScript environment and create a single-page app. I got the inspiration for doing this from Fog Creek’s blog post on the Trello tech stack.
Node.js was pretty nifty, but rewriting a whole server to do all the (sort of) complexity our current web application is doing was just a little too daunting. I had also looked at express.js for doing some of the heavy-lifting for me, but ultimately decided in the end that this was still too cumbersome for what I wanted to do. After stumbling on some backbone.js tutorials, I thought it would be best to try and integrate that with the Rails stack we currently have.
Calling Fancybox from Flash
Someone asked me once about loading external SWF movies from a Flex app and having trouble with unloading them. It had something to do with the audio in the loaded SWF file continuing to play after the SWF was unloaded. I didn’t quite understand the details, but I was asked if I knew how to fix the problem or work around it.
I suggested using ExternalInterface in Flex to interact with a JavaScript function in the HTML page to make Fancybox (a lightbox that is most familiar to me) display an iframe over the Flash SWF file. I saw in the Fancybox FAQ that it could appear over Flash content (with a caveat) so this gave me confidence that my idea would work. So I sent an e-mail to the person trying to fix this problem and described how to implement the solution with referenced links.