My beloved Plex (see here) is now available for the new Apple TV. As soon as I discovered this, the new Apple TV got added to my holiday list. We’ll see if I can hold out until then.

In their blog post about the release, the folks at Plex go behind the scenes a little bit:

The new platform allowed for two very different ways to build apps, each with distinct advantages and disadvantages. The easiest was TVML, which is a custom markup language evolved from the earlier version present on previous generations of the device. TVML is a markup language for media interfaces, meaning that it’s incredibly easy to make the beautiful screens you’re accustomed to seeing in the Apple apps. On the other hand, they allowed running full native code, which was obviously essential for games, and provided the highest level of control.

In and of itself, this is nothing revolutionary nor exciting. This passage, however, really stood out to me:

Fortunately, Apple makes it incredibly easy to bridge between the TVML/Javascript world, and the native world. So we worked hard to combine the best parts of both into the nascent app.

After a bit of experimentation, we settled on a clever mechanism whereby we’d request XML from the media server, and then transform it using XSLT into TVML.

This makes me happy.

Though XML is in many ways a completely barbaric, enterprisey way to transmit data, it does have a couple advantages. One in particular is how easily it can be transformed to look like a completely different document. Enter XSL Transforms.

In short, XML can be transformed by applying rules defined in another, special, XML document called a XSLT. The result of these transformations can look completely different than the original.

For example, many times in the past I’ve used XSLTs to transform an XML input into a HTML output. It works really well in certain use cases.

As a big fan of XSLT — even despite its many warts — seeing this post from Plex made me smile. I’m happy to see that the folks at Plex did what was smart, rather than what was cool. They embraced this nearly 20 year old technology to make the best app they could for a platform that’s, by some measures, nearly 20 days old.