ClickAider
You are currently browsing the Bogle’s Blog weblog archives.

Spring on Rails encounters an un-Groovy limitation

One of the big selling points of Groovy is that a Groovy class is supposed to be able to do anything a Java class can. It was for this reason that we chose Groovy for “Spring on Rails”:http://thebogles.com/blog/2005/09/spring-on-rails/.

Unfortunately, it appear that this is not quite the case. For instance, Groovy classes in scripts cannot be used to extend abstract base classes– the example below will result in an AbstractMethodError from Java if you attempt to run it as a script.

If on the other hand, you compile the script using groovyc, it works as expected, but making that work correctly in our system is going to involve some unwanted hoops and change the way scripts are written.

I’m hoping this is simply a bug and not expected behavior; I’ve filed a bug in the Groovy JIRA database to describe it.

If this can’t be fixed, it makes me wonder whether we might be better off using JRuby as a scripting language. JRuby can’t extend abstract Java base classes either, but Ruby is a more mature and widely adopted scripting language.
---- Base.java ----------
abstract public class Base
{
abstract int foo();
}


---- Subclass.groovy----------
class Subclass1 extends Base
{
int foo() { return 1; }
}

Base b = new Subclass1();
System.out.println(b.foo());

Google’s new XHTML mobile reformatter

Google has quietly rolled out a full blown mobile content reformatter in the style of “Skweezer”:http://www.skweezer.net. Google being Google, naturally it’s better– and, behind the scenes, perhaps scarier from a privacy standpoint.

Here’s what the reformatted eBay looks like; very nice. Notice how they have collapsed lists of links into a single link that can be expanded. Forms are fully supported, unlike the previous, severely limited WAP version.

I got to the reformatted eBay by search for [ebay] on the “XHTML version”:http://google.com/xhmtl of Google search, but you can also get there by constructing an appropriately formatted URL1.

I have updated Berry 411 and Berry Bloglines to use Google’s service for links to external content.

This is clearly a valuable service and on the balance I think the privacy tradeoff is worth it. But it’s important to be up front about what this mobile proxy enables Google to do– they will have detailed knowledge of users browsing habits. They can trace every site, link and form that you interact with. They won’t tie this information to your personal identity, but they will use it to target advertisements.

It’s important to realize that similar privacy tradeoffs will occur with Google’s wifi network. I believe one of the reasons for Google security client is to enable better tracking of individual users for purposes of targeted advertising– cookies are too easily erased.

Do users really understand these tradeoffs? I doubt it. Will a company that knows almost everything about everyone use this power always for good and not evil?


1 The format of the URL is simply:

http://www.google.com/gwt/n?q=&hl=en&sky=dmt&u=%s

where %s is the URL encoded URL you want to display.