Permanently funny facePermanently funny face

This is the last noteworthy feature Databinder expects to see before 1.0, so eat up.

RenderedLabel is my favorite Databinder component. Without a lot of trickery it turns text into an image using a font packaged in your Web archive.

I have more fun stuff in mind for it, but this upgrade is entirely practical: shared resource support for text images. Dynamic images, while cool, are hell on your server. They have to be generated and served not just once per user, but every time the page is rendered because they don’t have permanent, cache-friendly URLs.

The solution is to cache image resources on the server, using Wicket’s SharedResources facility. This takes a namespace (we use RenderedLabel.class, natch) and a name. The name is a hash of the label’s active ingredients (text, color, font…). Both of those identifiers show up in the image’s static, semi-nice URL.

If you’re interested in how shared resources work, take a look at the new and improved RenderedLabel source. Or if you want to use it blindly, update to the latest Databinder 0.9 snapshot and construct RenderedLabel with a true.

The feature is off by default, since we don’t want to cache things that won’t likely be displayed again (like the Ajax preview in graffiti). But you should definitely turn it on for the headlines on that weblog software you’re writing.

And hurry up with that, because I am sick and tired of taking potshots at Rails from my Rails-running weblog.

Codercomments

Off topic, I know, but… who is the guy behind the live search field?

He’s an unknown Remington Rand employee showing the UNIVAC to Walter Cronkite. I think that was back in the days of JSP vacuum tubes but I’m not sure.

Add a comment