Thursday, October 28, 2010

Gradle is Great

My initial experience with Gradle is very positive. I've been quickly able to convert over my Maven POMs to Gradle build files, which are wonderfully concise. You can see the last of the results in this commit (work backwards to the parent commits to see some of the Gradle build scripts).

So far, Gradle is living up to its motto: A better way to build.

Next up is dealing with Maven artifact deployments, and the generation of project reports.

I will absolutely be using Gradle for all upcoming projects, and will hopefully revise Tapestry itself to use Gradle at some point soon.

Google Analytics vs. localhost

Are you using Google Analytics and trying to test it on your pages? Does it appear to do absolutely nothing?

After a lot of playing around, we discovered that Google Analytics appears to check if the URL is for "http://localhost" (any port) and disables itself. No warning, even if you are using the new debug version of the Google Analytics script (which is still minimized and obfusicated, which kind of flies in the face of debugging). The GA script just does nothing.

Re-open your page using "http://127.0.0.1:8080/" and it works like a charm.

There is the briefest of mentions in a comment in their forums that kind of indicates this is how it is supposed to work. Ugh. It should be in bold font: This script disables itself when the accessed page is on localhost.

It does make sense that you don't want to flood GA with spurious page hits while you are developing and testing your application ... but would it kill them to send a warning to the FireBug console?

Update: using the asynchronous API along with the debug version (.../u/ga_debug.js) does appear to work, even on localhost. When I first looked at this a couple of months ago, the debug script was not available.

Monday, October 04, 2010

Back in London at SkillsMatter

I'm back in London for another Tapestry training workshop; I can't wait to see how well the revisions and extensions are going to work with a fresh crew of Tapestry developers.