Hacker News new | ask | show | jobs
by Xero 3936 days ago
So it's just HTML?

Is there a reason (legal or otherwise) that they can't just use HTML?

10 comments

"So it's just HTML? Is there a reason (legal or otherwise) that they can't just use HTML?"

The BBC have an open source library for building apps for TV based on HTML, CSS and JavaScript called TAL: TV Application Layer. It's designed to be deployed across HTML-based TV devices.

http://fmtvp.github.io/tal/getting-started/introducing-tal.h...

Apple's tvOS is likely to have much richer functionality since it's hosted on Apple's own hardware. However, an open standard for TV apps would be a good thing.

The BBCs TAL was released as open source in March 2013. But I don't know if it's gained wider traction in the industry.

In no way is this html. its xml. they use xml for the same reason that most do - to define their own elements and behaviors thereof
XML without namespaces, so pretty much just markup.

You know, without namespaces, you take out the eXtensibility-bit.

> pretty much just markup

SGML, actually. "Just markup" can entail other things, like TeX, for example.

I have no idea how it's actually implemented, but it's quite likely TVML is powered by HTML (and WebKit).

Rather than expecting developers to use an open-spec-compliant generic toolkit, they've just built modules on top of it to both make development easier and more importantly maintain a consistent UX.

You could just have pre-defined CSS classes and do much of the same thing, but it will not be as elegant nor as controlled. Taking over the HTML and JS interpreters just allows them greater control while respecting the role each component plays (markup, interactivity, styling, etc).

Implementing this with WebKit would be massive overkill; I'd say it's quite unlikely it's implemented with it.
If you implemented a web-like runtime from the ground up, you're saying you would write it from scratch?

The runtime has JavaScript support, it does not have a brand new interpreter.

The runtime has CSS support, it does not have a brand new interpreter.

The runtime has HTML/XML syntax. Why would they write a brand new interpreter?

Because the XML syntax maps directly onto UI components; introducing an HTML canvas is vastly more complicated than that.

Mappping XML to a small subset of UI objects is so simple you don't really need to pull in an entire browser runtime for it.

It's not like HTML except for being XML which looks a lot like SGML.

It's significantly more limited and more specific to the task than HTML. HTML comes with a lot of baggage that makes it unsuitable for a really specific use case.

It's not like HTML except for being XML which looks a lot like SGML.

XML does not only look a lot like SGML, it is a proper subset of SGML:

XML is an application profile or restricted form of SGML, the Standard Generalized Markup Language [ISO 8879]. By construction, XML documents are conforming SGML documents.

http://www.w3.org/TR/xml11/

Unlike HTML, btw, which started out as a loose subset of SGML but has abandoned the goal of SGML compatibility in favour of conceptual simplicity.
Interesting, I didn't realize they claimed XML was an SGML subset. I thought you couldn't express XML empty tags in an SGML DTD.
Supporting full HTML would much be more processor- and memory-intensive. It also gives developers more freedom, which can negatively impact the user experience.

I don't know if I agree with the tradeoffs they've made here, but those are at least two reasons to create their own custom schema here.

I think the heavy reliance on these templates is a good clue. Apple TV's interaction model is a lot about swiping around from tappable element to tappable element. Arbitrary layouts will make this a miserable experience. Apple probably wants to establish a number of layout patterns that they believe will yield a good experience.
As others have already said, it’s XML. This comment by jonknee back in the other Apple TV thread is a bit more detailed:

https://news.ycombinator.com/item?id=10194839

Would you really want full blown hypertext markup styled with css on your apple tv?

Just imagine all of the garish designs that would pop up.

It's better to restrict what is allowed in a custom markup language so that apple has better control over how it is rendered.

I'd guess that they don't use full-blown HTML to make sure developers don't go overboard and break the UX.
No, no, it's not HTML, because everything is inside <alertTemplate>, not <html>.