Live data from Hacker News

Apple TV Markup Language

developer.apple.com

41–50 of 74 posts

Re: Apple TV Markup Language

#41

Earlier quoted context omitted.

Why would anyone add complexity to the syntax when you can make it simpler by removing the XML namespace? If you need to add namespaces, then you have already failed.

If you have XML namespaces, you can embed foreign XML types in your XML (like the grandparent's SVG example) and also keep your schema-validating XML generators/parsers. That's good for the same reason static type checking is good. It can also simplify the code that parses it. With an SVG XML document embedded right in your TV XML document, you can e.g. use your functions that take an SVG node regardless of whether i…

You can do all sorts of stuff if you make it more complicated.

Doing more isn't a good thing.

Re: Apple TV Markup Language

#42

I think it's interesting that Apple is promoting making apps that are web based that you wouldn't have to get approval for to make updates. Maybe because it's limited on you can do with TVML but I think it's interesting.

I don't think that's what's happening here. Each of the TVML documents would be stored locally and called by a locally stored TVJS file, which is invoked by your binary. In other words, all of the program logic and display elements are on the Apple TV - only the data that's being retrieved and displayed would be stored server-side - which is no different from any iPhone app that displays server based content today.

No the app looks to an outside server for the code. Check out Apple's sample code which makes you run the code on a python server.

Re: Apple TV Markup Language

#43

Earlier quoted context omitted.

Why would anyone add complexity to the syntax when you can make it simpler by removing the XML namespace? If you need to add namespaces, then you have already failed.

It's if you want to have backwards compatible syntax supported by later devices. This will naturally happen as you add features and modify old ones. It's even more important in hardware devices that might might not be able to be updated later. EDIT: I think someone is probably down-voting me for a technical reason. Would you please explain it?

If Apple wants to break BC they just do it. They control the entire ecosystem and has been known to break stuff pretty frequently and force everyone to keep up

Re: Apple TV Markup Language

#44
post #2

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

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.

Re: Apple TV Markup Language

#45
post #19

Earlier quoted context omitted.

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 con…

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?

Re: Apple TV Markup Language

#46

Earlier quoted context omitted.

It's if you want to have backwards compatible syntax supported by later devices. This will naturally happen as you add features and modify old ones. It's even more important in hardware devices that might might not be able to be updated later. EDIT: I think someone is probably down-voting me for a technical reason. Would you please explain it?

If Apple wants to break BC they just do it. They control the entire ecosystem and has been known to break stuff pretty frequently and force everyone to keep up

I imagine they break stuff frequently, but not as frequently as they could if they wanted - though someone from Apple would know better than me of course.

Re: Apple TV Markup Language

#47
post #2

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

"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.

Re: Apple TV Markup Language

#49
This should be theoretically compatible with React right? I wonder if Netflix are using this + React for their Apple TV app or if they're doing something entirely different... There is a option so perhaps its through that?

Re: Apple TV Markup Language

#50

Curious on why they chose an XML-like syntax rather than something like JSON

XML is a markup language that can describe formatted document structure well, json is best suited for things like data. For instance, this would be pretty painful to describe in json:

Hello, dave

Conversely, this is pretty painful to describe in XML:

name dave

Post reply on HN