207 points · by abraham · 15y ago · 70 comments
^ I think Mozilla called their thing Chrome for a long while.
Mozilla's actively opposed to any form of JS/native code integration, undoubtedly because that would dilute the effective proprietary control over the Web platform that it shares with a small group of fellow browser vendors. (And maybe because it would wound the personal vanity of its senior developers.) It's already briefing friendly journalists against Google NaCl http://www.theregister.co.uk/2010/06/25/mozilla_on_jaegermon... http://www.theregister.co.uk/2011/02/18/google_releases_firs... , using comically disingenuous arguments: oh, it's just too bad that NaCl hasn't been blessed by the web standards process that we ourselves control! Opera is behaving similarly: http://www.theregister.co.uk/2010/10/01/opera_on_google_nati... .
Of course, it's another thing to extend this attitude to the desktop, where developers have plenty of alternatives to drinking the JS kool-aid. But presumably Mozilla is hoping that the accelerated-Javascript/"contemporary HTML" juggernaut will be powerful enough to sweep a good number of desktop developers along anyhow. Next Big Language and all that, after all.
I hacked up a trivial proof of concept on this branch: https://github.com/mozilla/chromeless/tree/jsctypes_play
Basically: Both can solve the same problem, but Chromeless is more powerful.
Ideally, Chromeless would allow you to take your webapp and (with minor modifications) turn it into a desktop app or vice versa.
If you want real HTML, you'll need to work out how to interact with your page from your non-JavaScript code. Two easy ways to do that: plugins and compilers.
IronPython allows you to embed Python in HTML [1] just like you would JavaScript. (A small Silverlight applet does the real work.) I haven't used this myself, so I can't vouch for how well it works in practice.
You can also write code in a language that compiles to JavaScript. [2] CoffeeScript is a popular choice, but there are quite a few others, including several compilers each for Python and Ruby. Some caveats:
* This can have performance implications if the compiler produces poorly-optimized JavaScript or compiles on the fly in the browser.
* Many of these compilers are toys, so make sure whatever you pick has seen real-world use.
* You still need to deal with JavaScript when you debug.
[0]: http://msdn.microsoft.com/en-us/library/aa970268.aspx
[1]: http://ironpython.net/browser/
[2]: https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
databases, IndexedDB should "just work", and thinking exposing SQLlite is worthwhile.
only the most basic network libraries at the moment.
(yes - I remember XULRunner and Adobe AIR - but the first didn't have any usable documentation, and the later is just Flash with webkit web view + AS<->JS bridge)
I've used it in the past, but I think Mozilla has a big opportunity here as Adobe has pretty much abandoned the web desktop aspect of AIR to focus on flash/flex for mobile.
Also, Adobe removes some of the best parts of webkit like web workers and I recently found a giant performance bug in their javascript engine that only exists in AIR.
Up until Craig's lawyers killed my app, I was using the flash installer that was seamless. Same sort of installation process can be seen on TweetDeck which uses AIR.
Looks like Air is similar to Java in that respect (or in my more cynical view, Visual Basic - but multiplatform).
Correct me if Im wrong, can you deploy your client side web app as a desktop application without using the Titanium framework stuff?