My technical world changed a bit recently with a few events that directly impacted me or the activities of my company, Disruptive Innovations:
- Mozilla shows increasing signals that the future of XUL as a platform for embedders like my company is not bright. XULRunner has many users around the world but it's not part of the roadmap any more, unfortunately. I won't discuss here their corporate strategy. My applications BlueGriffon and BlueGriffon EPUB Edition being based on XULRunner and my business being largely based on them, it would be a bit foolish to avoid looking for an alternative...
- the two only potential solutions, Qt on one hand and AdobeAir on the other, do not satisfy me for the following reasons:
- Adobe Air is nothing near native,
- Qt is a big and powerful beast, hard to learn and master.
- Apple's Swift looks nice and powerful but cross-platform is not a word available in the Apple ecosystem.
- I have discovered Haxe. Haxe is an open source toolkit based on a modern, high level, strictly typed programming language, a cross-compiler, a complete cross-platform standard library and ways to access each platform's native capabilities. If you know ECMAScript and/or Java, you'll find Haxe fun and easy to master. I started playing with it and fell in love with its beauty, simplicity, and the large numbers of packages available.
In such cases, I take a few sheets of paper and start writing ideas. I have put a lot of ink on a dozen of originally blank pages and tested a few designs. I want, I need a very simple, flat learning curve way of writing standalone cross-platform native apps. And if the existing ecosystem can't give me such a tool, well, I do what I always do in such cases: I write my own... So I started writing my own environment for native desktop and mobile applications.
My requirements were the following ones:
- all UI specified in html5, of course, with the help of
roleattributes... Maybe I'll add a XUL-like language too just for migration purposes.
- UI styled by CSS, eh what did you expect?
- resulting native UI
- code in Haxe of course compiled to native!!! Assets not trivially readable like with JS...
- trivial embedding of Haxe-based gaming frameworks
- trivial embedding of a browser instance (Blink, Servo, etc...). When I say trivial, I really mean it. If you've played with CEF, you probably understand that this is not what I mean.
- no ugly hacks to deal with OSX menus or Windows icons.
- dynamic UI changes based on DOM manipulation just like in XUL
- very simple localization
- a "Hello world" button in a native window should be a one-minute
thing. No big environment to install, no complex setup, no new IDE to
learn. You know html5? Just put a
<button>inside a new document's
<body>in your favorite code editor, open a terminal and type "quaxebuild". Done, you have a native app in hands, ready for distribution.
The result will be Quaxe. Native desktop and mobile applications with native UI from html5 and Haxe.
I am glad to share with you the first demo screenshot below. The app was
launched through a
open bin/mac/MyFirstTest.app command line
on OSX. Just to be very clear, there is NO BROWSER WINDOW in the
screenshot below. The app is only a native resizable main frame containing
a native button. It's specified in html5, you can access and modify its
DOM but it's not your regular browser, there is no Blink, Gecko, Servo or any Web rendering engine inside. There is no common runtime either, à la Adobe Air. It's very, very lightweight despite of having to implement a xml parser, DOM4, a CSS parser, the whole CSS cascade and an OM for the widgetry.
As you can see above, it's already taking shape. If you're an investor and you're interested, please do not hesitate to contact me at your convenience. Writing native apps is going to be way cooler and simpler than it is now, that's a promise.