Announcing Quaxe, native desktop and mobile apps from html5 and Haxe
By glazou on Monday 10 November 2014, 09:46 - Disruptive Innovations - Permalink
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...
- I have not found a single solution allowing me the flexibility of XUL+JavaScript in native desktop and/or mobile cross-platform apps; there are hybrid solutions for mobile, almost nothing for desktop in a cross-platform fashion.
- 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
role
attributes... 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.
Comments
Quaxe looks promising.
Does it really need separate build tool (quaxebuild) ?
I mean, you can execute any system command from .hxml project file or from macros before or after compilation. But adding your own project file type for Quaxe will make it incompatible with existing Haxe IDEs.
What about https://github.com/rogerwang/node-w... or CEF (Chrome Embedding Framework)?
There is a haxe project to write applications with html and haxe js, and compile to native:
https://github.com/silexlabs/Cockta...
But there is bugs and the project is moving slow. I really like to see a project to write apps with html, and I very happy to see you project.
I have the same concerns (and disappointments…) regarding the future of XUL, and I’m looking for similar alternatives as well. I’ll give a close look for sure.
Best luck for this project!
Awesome. We use CEF today for our app (written in Javascript, but delivered as a desktop sofware) but had to do a lot of custom dev to make it work. (file management, generating images (screen shot), etc.)
Looking forward to give it a go.
This looks very exciting!
I have seen some similar work done using wxWidgets, but I'm unsure of the fate of the project. If you are interested, I think it could be neat to support cross-platform UI in (or over) a library like Lime. Please let me know if you would be interested in collaborating at all.
Keep us all posted as you go further :)
Hi
Glad to see that happening! Hope to discuss it at the Haxe-peros soon :)
Exciting news :)
I've played with node-webkit before, but a way to build truly native apps with pure HTML/CSS and Haxe would be awesome!
Keep up the great work!
This sounds awesome. Cannot wait to try this out when it goes live!
Also, I second @joshuaranick's comment - please have this compile with an existing haxe library, such as lime or openfl. This would ensure that it is able to gain compatibility with the large number of libraries that already are written for those platforms.