Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by swombat on Thursday March 28, 2013 @09:01AM
(#5454498)
No, it doesn't. The author is suggesting porting a GUI toolkit (e.g. KDE) in asm.js, rendering it directly to the user, and doing away with the DOM altogether.
Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by anton-107 on Thursday March 28, 2013 @09:29AM
(#5454627)
Isn't it exactly a thing in which Java failed about a decade ago? Apps running in a VM using GUI toolkit instead of DOM, delivered right into your browser window? What could be better? Well it's proved to be a total failure on the web.
Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by swombat on Thursday March 28, 2013 @10:33AM
(#5454966)
Oh, agreed. But that's the idea that's being pitched.
Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by ebbv on Thursday March 28, 2013 @09:11AM
(#5454544)
You can't "do away with the DOM altogether". You need to have some method of interacting with the browser; location, AJAX requests, cookies, etc.
Porting a GUI toolkit only relieves your need to deal with CSS, it does not alleviate you of all need for the DOM.
Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by swombat on Thursday March 28, 2013 @09:12AM
(#5454549)
You're splitting hairs. In practice, if all you're dealing with from the DOM is one canvas element and a URL that's static, you've pretty much "done away" with the DOM.
Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by ebbv on Thursday March 28, 2013 @09:16AM
(#5454571)
That's not true at all. You need some way of interacting with a back end (as well as the browser.) Whether that's via forms or AJAX requests, you need more from the DOM. The DOM is not just a GUI toolkit.
I am not splitting hairs, you are glossing over serious limitations to this approach.
Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by kayoone on Thursday March 28, 2013 @09:01AM
(#5454492)
Developing some kind of API binding for the DOM or JQuery is no impossible task though, similar things have already been done in other languages (in C# and the Xamarin Framework for example)
Re:Will Emscripten/Asm.js kill Web-Development as we know it?
by ebbv on Thursday March 28, 2013 @09:13AM
(#5454555)
No, of course it's not impossible. But I was pointing out a flaw in the article, it glosses over this issue.
And this hypothetical API would need to be implemented individually for each language that you want to use for client side scripting.
Like I said, in the near term it's a lot easier to just write JavaScript.
Compiling to asm.js just gives you the ability to translate your other language code to executable JavaScript. It doesn't solve the issues of DOM interaction.
In order to write your client side code in Ruby you'd need a DOM library LLVM them somehow understands how to translate into its JavaScript equivalent.
In the near term its certainly much easier just to write JavaScript. Which is honestly, really, really easy.