The Wayback Machine - https://web.archive.org/web/20120321144746/http://www.google-melange.com/gsoc/project/google/gsoc2011/linuxhippy/11001

HTML5/Canvas backend for Caciocavallo (GNU-Classpath)

Clemens Eisserer

Abstract

A HTML5 backend for Caciocavallo, allows existing Java/Swing application to be used without any Java support on the client platform and to be deployed as an ordinary web application. This would open up completely closed devices like Apples IPhone/IPad for Java applications without porting effort. Idea mentioned on Classpath's idea list: http://developer.classpath.org/mediation/GoogleSoC2011

Additional Information

HTML5/Canvas backend for Caciocavallo, to allow Java/Swing applications to be deployed and used as HTML5 Web-Applications.
Benefits
A HTML5/Canvas backend for Caciocavallo would allow existing Java application based on AWT and Swing to be used without any Java support on the client platform and to be deployed as an ordinary web application running on a web-server, a HTML5 conformant browser and a low-latency internet connection would be enough to use the application on the client platform.
Beside broadening the field of supported devices especially in the mobile area, this would open up completely closed devices like Apples IPhone/IPad for Java applications which would be displayed simply using the HTML5 capable browser of those devices. Therefor existing software could be used without porting effort or any proprietary software involved.
The Classpath project and especially Caciocavallo could benefit by Caciocavallo getting more interesting by a broader audience, attracting hopefully more developers willing to contribute and more users to give feedback.
Deliverables
A new backend for Caciocavallo, with the following functionality:
1. Rendering redirection including smart damage tracking and compression:
When running the Java-application on a server, rendering (usually triggered by client input) is done on an Image-Surface. Changes need to be sent to the client. In order to efficiently use bandwith and processing resources - only modified areas shall be transmitted.
Where feasible optimizations like CopyArea can be implemented, in this case to speed up scrolling. The backend will also have support for rendering outside of the input-thread, which is required for animations.
2. Input support for keyboard and mouse
Mouse and keyboard events need to be transmitted to the application running on the web-server.
Modifications will be made to Caciocavallo as necessary, to make it compatible with more current versions of OpenJDK7's source code and/or to extend its functionality where needed.
For modified areas existing documentation will be updated of course.
New documentation specific to the backend will be created. Beside general documentation, an “overview-documentation” will be created, explaining how the parts play together, as well as documentation about rendering/latency optimizations.