Hacker News new | past | comments | ask | show | jobs | submit login

Ah, "code once. deploy everywhere." Few examples of marketing to engineers spark quite the same level of skepticism as this oft-repeated claim.

Ignoring, for a moment, the complexity of deploying software across multiple platforms, it's important to remember the multiple form-factor problem. The same software doesn't work from a user's standpoint on multiple platforms if the UI isn't correct for that device. The best example I can give is "mobile versions" of sites and apps, clearly targeted at the form factor of a phone, being delivered to a 10" tablet. It's crappy.

Bring in the obvious elephant in the room of the number of times this claim has been made from an engineering standpoint and truly failed to deliver, and I yawn every time HaXe is mentioned.




It should be required that anyone who says "Write once, run everywhere" must write an essay about how they avoid the Java pitfall: "We look consistent everywhere -- but consistently crappy."

JavaScript has almost solved this problem, if one views HTML and CSS as the domain-specific languages which JavaScript deploys for rendering its GUIs. You have to know a lot of quirks, but when you finish a site which looks nice in Firefox you can have a reasonable assurance that it doesn't look absolutely horrible in WebKit browsers.

What's more surprising is that it has come this close to solving that problem, but I don't remember anyone ever promising JavaScript as something of this nature. There exists some JavaScript pride today, especially with CoffeeScript and Node.js, but since at least my first internship in the summer of 1999 it has been faced with inconsistency and standardization pains -- and I don't remember anyone before that time promising that you could run the same HTML/CSS/JS everywhere. By those standards it's more of a 15-year goal than an initial pitch.


http://unity3d.com/

Yes, you have to make allowances for the actual differences between platforms (physical buttons, screen sizes, input methods), but the rest of the code deploys extremely well across platforms. When moving between platforms, you only have to rewrite the pieces that you actually want to be different.


Unity is great for a restricted problem space: applications that almost fully define their own GUI, namely games.

A truly harder cross-platform problem is to abstract access to OS GUI in usable way.


Keep in mind that you have created a strawman by extending the requirements of "deploy everywhere" to be UI-focused, when one-size-fits-all UI is not listed as a selling point.

In the case of HaXe, its focus has emerged from Web games with server-side needs, where UI is primarily a concern on only one platform, or shared between two platforms(Flash and JS/HTML).

Although there are now several haXe libraries that are willing to suffer the "slings and arrows" necessary to provide a flexible API experience, the core language is very realistic about what it is going to provide across all platforms - a limited set of data, logic, and networking compatibility. In all other respects the language is very, very concerned with being able to drill down to the native features of each platform and achieve as native an experience as possible given the constraints of a garbage-collecting, dynamic/static mixed, classy OO language design.


Right -- I understand this is the type of phrase that's used a lot, but doesn't really follow through.

I have to say though, I've been using NME (haxenme.org), which uses the haXe language. It really does work, and it performs significantly faster than Adobe AIR or Corona.


"Write once. Debug everywhere."


But would you use haXe for UI work? To me the language seems useful in a scenario where you write your core business logic in it, export to said languages and then write Adapters and Facades to plug it into the platform of choice.


I would not use it for UI work where I want a system style UI, with native components. Something such as Titanium Appcelerator is better for that.

I would not use it to make a website UI, that is for HTML / CSS.

I do use it for games. I do use it for server side programming. I do use it for complex Javascript (including games).

It's write once, deploy smartly. Of course I can't write a server side program and then have it run on my phone, that doesn't even make sense!


I completely agree.

I use haXe on a daily basis, for cross-platform application development and for me: => 1 platform (soft or hard) = 1 app.

But haXe makes it possible to keep the application logic, and not to start from scratch every time.

And I publish for a lot of platforms, in web and native forms: mobiles, smart TVs, tablets, html5 websites with a Flash version used as a fallback in case one do not have a recent browser, points of sell / touch screens. And some haxers target the game consoles.

So it is really impressive, even if the slogan is clearly not true nor relevant - haXe community has always have problems with communication (last time I talked about it with one of the founders, he answered "what communication problems? it is the most efficient way to communicate", and I finally understood that he was talking about client-server communication :D no comment!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: