Ask the readers: How do you keep DRY when exposing your Rails apps to iGoogle?
My most recent Pathfinder project calls for a pretty typical Ruby on Rails web application with two interesting additional components: a Facebook application and an iGoogle gadget. Though a Rails Facebook plugin was easy to find, Rails development tools for iGoogle weren’t as thick on the ground.
First, a bit of background: iGoogle, Google’s personalized-homepage service, offers developers two methods of application development:
- build a native gadget by wrapping custom HTML, CSS and JavaScript in an XML wrapper.
- build a sandboxed gadget by wrapping an externally hosted web application in an iframe.
Because of cross-domain security issues, gadgets that require authentication must be built using the iframe sandbox method. As it turns out, this method’s a lot easier. Instead of building a whole new interface, you can just tart up your existing app with an iGoogle-optimized user interface. Why replicate your existing view logic with a bunch of iGoogle-specific JavaScript when you can just reskin and call it a day?
As it turns out, though, reskinning a Rails app for iGoogle isn’t as simple as it might seem at first glance. I can think of three options. All have drawbacks:
Read more »
