Skip to content

gsoc_2011_ideas edited this page · 24 revisions

Canvas Support in webkit-based pyjamas desktop


Pyjamas Desktop allows developers to debug their applications directly in Python, speeding up development process quite a bit (and also allows developers to write a single application that works both in a browser and stand-alone application).

More Info

Previously the main version of Pyjamas Desktop in Linux was based on XULRunner. Partial functionality was available on Mac OSX via Webkit and on Windows via MSHTML. Canvas support in Webkit was (and still is) unavailable, and I believe MSHTML canvas uses VML, which is pretty slow. Since then Ubuntu completely destroyed the ability to use XULRunner's hulahop, breaking Pyjamas Desktop and several other programs (last working version of XULRunner is 1.9.1 on Ubuntu 9.10), and while I'm not sure if other Linux distributions still run XULRunner-based Pyjamas Desktop, it seems that XULRunner-based PYJD is now obsolete, especially since Webkit version got a lot better, and faster than XULRunner.

Unfortunately, Webkit version does not currently support canvas. This is a big bummer as canvas is one of the main Flash-killer features of HTML5.

As a follow-up to this task, getting Webkit-based version of Pyjamas Desktop working on Windows would be fantastic, as this would allow a single Webkit-based Pyjamas Desktop to work on all 3 major operating systems with the same consistent functionality. This 2nd task was tried in the past by Luke, but he wasn't able to get it working:

Mobile Support

Create support for mobile platforms (iOS/android) to work with mouse inputs.


And a port of Tomas's A parser stuff to python, along-side fixing up that java2python project that uses ... what is it... not python-ply, the other one.

IE9 support

Current version of pyjamas sees IE9 as a browser based on IE6. As a result it makes several assumptions that hinder IE9 performance. It uses some tweaks to allow pages to render correctly in IE6 that IE9, being much more standards-compliant, no longer needs. It also simulates canvas element via much slower VML that comes standard with IE6-8. Since IE9 now supports canvas natively with same speeds as other modern browsers, this VML feature does more harm than good for IE9, forcing it to use slow (and now obsolete) VML.

The best approach would be to create a new identifier for ie9 similar to current "safari", "mozilla", "ie6" identifiers (could even call it "ie9"), then a new __ie9__ directory inside the library directory where other browser-specific module implementations reside in case ie9 needs any unique tweaks, letting the compiler be aware of it and compiling *.ie9.cache.html version of the website in addition to the current ones

Web Application Framework

Creating a web application framework on top of pyjs's ui and browser library for making application faster to create and run and looks beautiful. ( css theme, layout, event propogation, secure rpc, project organization, multiple app in one app etc ) ( equivalent to for gwt )

Something went wrong with that request. Please try again.