Skip navigation.


Skip the blog side panel.

GSOC conclusions

Hello everyone!

Since my previous blog post I did some polishing to the Moodle 2.0 integration. Dan Poltawski from the Moodle community has provided his valuable feedback. He suggested I switch the parsing of the data URL to a regular expression and that I warn users before submitting a form while editing an image with unsaved changes. I made both of these changes and now I am looking forward for more feedback.

This blog post is more about the overall Google Summer of Code conclusions. So, here we go. I started from a simple PaintWeb demo application, which had only one JavaScript file of about 6000 lines of code, without any proper jsdoc-formatted comments. Over the summer I did the following:

  1. Split the whole code into multiple files: per drawing tool, per extension, per language.
  2. Created a new configuration file which allows changing almost any option inside PaintWeb, including keyboard shortcuts, tools, extensions and more.
  3. Reorganized the entire code, followed more strict coding guidelines, more naming consistency, etc.
  4. Wrote jsdoc-formatted comments for every function and method. Based on the code now I can generate a complete and up-to-date PaintWeb API reference documentation.
  5. Changed the way PaintWeb loads: the whole GUI is loaded using an XMLHttpRequest from the server and added into the page. The PaintWeb demo was a stand-alone Web application, but now PaintWeb is a component which can only be used within another Web application - in a similar fashion to how TinyMCE can be used.
  6. Developed a new API for PaintWeb extensions, tools and "commands". This allows new developers to easily extend and modify PaintWeb at any time.
  7. Implemented a new PaintWeb extension: MouseKeys. This allows users to draw with the keyboard - no mouse is needed.
  8. Reimplemented keyboard shortcuts support such that it works much better across different Web browsers. You can learn about this work from the latest tutorials I wrote for Dev.Opera about keyboard accessibility in Web applications.
  9. Made important performance improvements for the OLPC XO.
  10. Split the GUI into multiple files: an XHTML file, a CSS and a JavaScript file. This allows me to focus on GUI code, or on the base code of PaintWeb.
  11. Implemented a new GUI for PaintWeb, with better keyboard accessibility, and with a new logo.
  12. Implemented a new "application events" API which allows developers to hook into PaintWeb by means of events. For example, developers can listen for events like "imageSave" or "imageSizeChange". Such application events are used heavily in the new interface implementation.
  13. Implemented numerous selection tool improvements and fixes.
  14. Implemented a new "Hand" tool for dragging the image inside the viewport.
  15. Made some important fixes for the Eraser tool.
  16. Made PaintWeb behave better with huge images - around 6000 x 6000 pixels.
  17. Made improvements to the Text tool and implemented better cross-browser compatibility. Also, attempted Opera compatibility with no luck.
  18. Made PaintWeb ready for "production use" by properly packaging the whole Web application. The PaintWeb packaging process is driven by a Makefile.
  19. Wrote "some" PaintWeb documentation.
  20. Wrote a hefty TinyMCE 3 plugin for easy PaintWeb integration into TinyMCE 3.
  21. Updated some patches for TinyMCE 3 integration into Moodle 1.9.
  22. Implemented Moodle 1.9 and Moodle 2.0 integration - with different levels of success. That is, Moodle 2.0 integration is succesful and working properly, while the Moodle 1.9 integration still requires additional work due to the lack of a file API.

That's about all I did over this summer. I am very pleased with the results. In some cases, the results are beyond my initial expectations. For example, I did not expect to have so much PaintWeb documentation done over the summer. Writing the code for all of the above was fun and a pleasure for me.

The Moodle community has been really great and friendly. I appreciate all the feedback I got from the whole community.

What's next? Well, I hope this GSOC marks the beginning of a fruitful collaboration with Moodle and with the overall open-source community. I would like to continue work on Moodle 1.9 and 2.0 integration, and further improve PaintWeb. I certainly do not want to abandon the project. :)

I must thank Helen Foster and Martin Langhoff for their constant support over the summer, with feedback and testing. For example, Martin has provided important help with the performance work for the OLPC XO, together with Robert O'Callahan from Mozilla. And Helen was always ready to answer any GSOC-related questions. ;)

Last, but not least, thanks to Olli Savolainen and Jose Cedeno - two of the Moodle GSOC students who were very helpful, by testing PaintWeb and by providing valuable feedback.