W3C home > Mailing lists > Public > public-canvas-api@w3.org > July to September 2011

Cross platform applications

From: Charles Pritchard <chuck@jumis.com>
Date: Fri, 02 Sep 2011 14:26:23 -0700
Message-ID: <4E6149FF.5020904@jumis.com>
To: Canvas <public-canvas-api@w3.org>
The haXe programming language has long provided a method for authors to 
write an application once,
and compile that application as C++, ActionScript, JS and/or PHP. It 
also includes Flash bytecode output.


The haXe community continues to work on C# and Java output.

It works on a typing system very similar to WebIDL, and for each target, 
requires libraries implementing target namespaces. It includes macros 
and target-specific if statements.

I've had good success using haXe to create a Canvas to PDF interface.

An interesting haXe library is NME:

"NME goes straight to Flash, iOS, webOS, Android, Windows, Mac and 
Linux—all from the same codebase. Your project compiles as a native 
application for every platform."

Unfortunately, like many server-side and compiled projects, NME does not 
primarily follow web standards. It has its own naming schemes, and so 
forth. It does however, output to web standards, as well as custom 
libraries for non-web targets.

I've worked extensively in implementing the HTML Canvas 2d spec atop 
various platforms. This allows me to write once in JavaScript, and 
target Rhino for Java, or Flash (via Flex), and compile my source code.

This kind of work seems to be out-of-the-scope of the WHATWG. That said, 
it's very much in scope of the W3C standards, in attempting to develop a 
library of safe (royalty and patent safe) specifications for use in 

I suggest you all keep in mind, as we delve into custom components, and 
work with interface commitments to OS, UA and AT APIs, just how flexible 
application programming has come. If we continue to build, and program 
with web standards, such as HTML Canvas, such as ARIA, we can continue 
to extend the capabilities of Web Applications.

Here we have node.js, starting to implement the Canvas 2d API:

And an example of Canvas and node.js networked:

The Canvas 2d standard enables one programming namespace to be used 
across so many platforms. It enables us to build libraries based on the 
standard, and to build support for the standard across systems. It has 
allowed me to target IE6, it's allowed me to cross-compile to Java, to 
Flash. It's a fantastic situation.

I hope we can move beyond the current deadlock, and complete the a11y 
hooks for Canvas, so that it may be used as a first-class object across 
systems. Within and outside of the web browser.

Received on Friday, 2 September 2011 21:26:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:10:32 UTC