Karma

From Sugar Labs
Jump to navigation Jump to search
Karma.png

Karma is a yet-to-be-created framework for creating very simple Sugar activities using javascript and html5. Karma relies extensively on the jQuery javascript library. It is not intended to create powerful animations, simulations, or reusable artifacts. PyGTK and pygame are much better tools for those purposes. Check out the Karma Project blog for updates.

Team

Felipe Lopez Toledo "SubZero" is creating a prototype for Karma as a Google Summer of Code project. Bryan Berry is serving as his mentor.


Project Requirements

  • Create a single prototype activity which could be used as a template for sugarizing AJAX activities. The GSoC participant should not create her own activity but recreate an existing activity such as one of OLE Nepal's flash activities.
  • This prototype should have the following features:
    • Simple interactive animation and audio using html5 tags like <canvas> and <audio>
    • An assessment section that stores results of student's progress and gives them suggestions on improvement. Assessment info should be persistent.
    • Has embedded pdf or pdf like document reader for activity lesson plan and teacher notes.
    • Integrates with the Journal
    • Navigation and Help elements, ideally reusing widgets from jQuery
    • Some element of collaboration using Telepathy (This could be really hard, depending on the state of javascript bindings to dbus)

Technical Architecture

  • ToDo* need to update this

Karma will work with basic functionality on any W3C standards-compliant browser. This notably excludes Microsoft's Internet Explorer. Karma will be particularly tailored to work within Sugar's Browse activity. Longer-term we hope to extend Karma to take advantage of Sugar's collaboration features.

Karma depends heavily the javascript library jQuery, version 1.3. Karma may end up using a subset of the jQuery UI library.

jQuery currently lacks full animation support but there are a number of other projects underway to create that functionality. For this reason, Karma will extend jQuery when we need to add new animation functionality rather than creating independent libraries. This should ease collaboration with others working on animation support for jQuery and ease possible integration/merging later.


Possible Underlying Components:

  • Karma will work with any modern standards-based browser (this notably excludes Internet Explorer). Animation performance will be significantly better usin one of the latest javascript engines such as Google Chrome's v8 javascript engine, Mozilla's tracemonkey, or SquirrelFish.
  • Google Gear's Filesystem API because it seems to have the most traction in the linux world
  • Some mechanism to support dbus events


Conventions

Meetings

  1. Regular meeting between Felpe and Bryan every Tuesday 0200 UTC at #sugar on irc.freenode.net
  2. General GSOC meeting for participants from Sugar every Tuesday 1400 UTC #sugar-meeting

Meeting Notes

Project Plan

There are roughly 4 parts to this project plan: first get titanium running on the XO, second create a very simple learning activity with javascript and html5, third get that activity running on the XO in a roughly sugarized version of titanium, fourth extend the activity to take advantage of Sugar-specific features such as the Journal and Collaboration.

Before GSoc - May 22:

  • get familiar with Sugar
  • get familiar with html5
  • Felipe to acquire XO
  • learn more about java script
  • select the appropriate js framework

June 2 - June 12:

  1. “Karming” the "Quadrilaterals" activity using a non-elegant approach
  2. Post blog entry detailing challenges encountered and ideas on how to simplify the animation methods
  3. Post message to jquery-en and jquery-dev mailing lists asking for feedback


June 13 - July 12:

  • Developing the first Karma widget (easy animation tool, boost animation tool from the selected js framework)
  • Getting familiar with Sugar/Browse code
  • Providing Karma + audio
  • Providing Karma + client-side i18n
  • Developing an activity template for Karma
  • Changing the original activity to include above features

July 13: Publish blog post that showcases updated activity. Explain problems encountered, what works, what still doesn’t.

July 15 - July 25:

  • Fixing bugs
  • Work on gears+karma support

July 26 - July 31:

  • Documenting examples
  • Improving documentation

August 1 - August 9: time for any eventual emergencies

Project Risks

  1. Creating interactive animations with html5 and javascript is very new technology as html5 is a new standard. It could be much harder to create animations than we expect. Risk Level: High
  2. Javascript animations could be very slow on the XO. Risk Level: Low, we don't need very complex animations
  3. It could be very difficult to interface titanium with telepathy. Risk Level: High
  4. The Browse Sugar activity uses the spidermonkey javascript interpreter, which is not optimized for hmtl5. Karma's animations may be prohibitively slow in Browse and require a version of Browse that includes the newer tracemonkey javascript interpreter.