News for hackers. Stuff that matters.
Re:We need more native code by krschultz on Tuesday April 17, 2012 @07:54PM (#3855652)
Web apps solve three problems.

1) immediately update your users all at once. Supporting 5 versions of legacy code sucks and adds friction to iteration.

2)monetization. Ads are more acceptable online. Subscriptions have better lifetime value than single purchases. And piracy is prevented.

3) usage metrics are a lot easier.

Bonus: cross platform.

If we can roll some of those up into a native app framework on top of. Net or JVM people might go back. Where is the Scala on JVM equivalent of Ruby on Rails that makes writing desktop apps fun again? (Doesn't have to be scalar or JVM, in just sayin')

*sorry for the typos, I'm fat fingering this on a smartphone If

Re:We need more native code by jay_kyburz on Tuesday April 17, 2012 @08:16PM (#3855730)
cross platform is not a bonus, it's my number one reason to build web apps..

"hacking a solution for the web that would work much better on the desktop is definitely not something you want to do."

the important question being which desktop?

Re:We need more native code by ssp on Tuesday April 17, 2012 @08:33PM (#3855780)
I've sometimes wondered whether you could solve those problems within a system that provided a more native experience. For example, consider a new kind of client that would download and run bytecode instead of HTML/CSS/JavaScript.

The bytecode would have a built-in abstraction layer over various platform facilities such as graphics and sound, allowing it to look and feel much more like a native application.

Re:We need more native code by sophacles on Tuesday April 17, 2012 @08:44PM (#3855812)
This was called java applets, then flash, then silverlight the last few times it was tried.
Re:We need more native code by ssp on Tuesday April 17, 2012 @09:05PM (#3855899)
It was also called "web browser" one of the last times it was tried. Those became quite popular I believe.

Flash has done quite well actually, but one flaw is that it is completely tied to the web browser, so it doesn't provide a really native experience. AIR would be a better counter-example. Also, flash is quite unreliable.

Java applets had an addtional problem in that they required a huge standard library and took forever to start up. I'd suggest instead to download the standard library on demand.

Re:We need more native code by sophacles on Tuesday April 17, 2012 @09:13PM (#3855934)
"Web browser" downloads and runs compiled bytecode instead of html/css/javascript now (as the gp is suggesting)? Without a special plugin? Huh, news to me.
Re:We need more native code by ryannielsen on Wednesday April 18, 2012 @01:27AM (#3856645)
I'd love to hear what you consider to be the significant difference between "bytecode" and "code". Compiling ASCII code down to bytecode or machine code doesn't change semantics (not often significantly, at least); code is code. The browser is downloading and running code, and is offering an increasingly robust and attractive platform from which to do so.

How's that different from Java or Flash or Silverlight or anything else that requires a "special plugin"?

Re:We need more native code by sophacles on Wednesday April 18, 2012 @09:35AM (#3857820)
From a semantics point of view: the post I originally replied to asked about compiled bytecode, not textual code.

From a deeper point of view: Theoretically you are correct. But in practicalities... Peresumably you get 2 benefits from compiling the code to bytecode:

* obfuscated source so people can't steal your secret sauce.

* faster execution because the compile step is skipped.

The second one has real practical limitations: for any major gain, the bytecode has to be in a format that allows fast execution, which usually includes taking out certain checks that can be done at compile time, taking advantage of lower level runtime stuff and in some cases, optimizations for the hardware arch below. This is all well and good, but when you have multiple engines interpreting the bytecode, this can be done in very different ways. In practice, to get from a robust bytecode to something that takes full advantage of the system, effectively invokes a second compile step from bytecode to the vm's internal representation. This is what a lot of JVMs do. I'm not sure anything would actually be gained in that case.

Further, a robust bytecode format would required, since there are already piles of hacks in the JS libraries we all use to handle various browser differences. To get a bytecode that allows this, we end up with something that looks more like a simple source code transform than any bytecode that gives significant speedup out of the gate. (and at that point, your obfuscation of the code starts to go away too - you could just disassemble it to something that looks like jsmin output).

Re:We need more native code by sciurus on Tuesday April 17, 2012 @09:07PM (#3855907)
Re:We need more native code by esrauch on Tuesday April 17, 2012 @08:10PM (#3855705)
There are perceived differences that make the difference non-ad monetization more complex than that. I think people would be less willing to pay a flat fee for a website than for an app. Part of it is that web operators feel they need to be on a subscription model rather than flat-rate, but it isn't like there is no maintenance cost for a native app.
Re:We need more native code by repsilat on Tuesday April 17, 2012 @09:00PM (#3855882)
> a native app framework on top of. Net or JVM

We may need a new word - these platforms fall on the "managed" side of the native/managed split, but on the "native" side of the web/native one.

Re:We need more native code by acuozzo on Tuesday April 17, 2012 @09:51PM (#3856064)
> Bonus: cross platform.

I run Links+ (http://links.twibright.com/) on OpenBSD to access the WWW. I don't have X11 installed, as I find GUIs to be far too distracting. Do you know of any ``cross platform'' web apps that work well in my environment (besides HN, of course)?

Re:We need more native code by theootz on Tuesday April 17, 2012 @09:54PM (#3856077)
You are, by far, in the minority of users. It doesn't make sense for dev's to extend that "cross platform" capability to use cases such as yours in most instances.
Re:We need more native code by acuozzo on Wednesday April 18, 2012 @08:28AM (#3857587)
> You are, by far, in the minority of users. It doesn't make sense for dev's [sic] to extend that "cross platform" capability to use cases such as yours in most instances.

Then it follows that devs shouldn't support, e.g., deaf users.