Developers/Stack

From OLPC
< Developers
Revision as of 20:56, 13 December 2007 by Mcfletch (talk | contribs)
Jump to: navigation, search

Previous Up Next

Official description of the Software components on the laptop (XXX maybe merge this into that page, we want links to further information about each library, though?)

Development Languages:

  • Python is strongly encouraged, to have a single language "under the hood" when the curious child looks inside
    • C/C++ should be used where Python performance is unacceptable, but try to keep it to a minimum, preferably as standard well-encapsulated and documented components
  • Smalltalk-speaking developers may wish to work within the eToys environment
  • Javascript can be used in web-based applications (Gecko or Opera engine Javascript implementation)

GUI Environments:

  • PyGTK or the PyGTK-derived Sugar system should be used for most "Window, Icon, Mouse, Pointer" type GUIs. Note, however, as of 2007-04-21 that the Sugar "graphics" package is in Flux.
  • Pygame SDL-based 2D game environment can be used for "Canvas" graphics using "Sprites".
  • (Mozilla) XULRunner can be used to develop Gecko-based activities
  • EToys

Operating Stack:

Libraries/modules/services of note:

  • D-BUS -- efficient Desktop-level RPC engine, most specialized laptop hardware and operations are exposed over DBus
  • Telepathy (Glib, Salut, Gabble) -- collaboration/communications engine with "Tubes" (cross-machine RPC over DBus) and various network traversal and discovery logic, activities are encouraged to use Tubes where ever practical
  • CSound -- acoustically modelled sound-synthesis engine (seen in the TamTam activity)
  • Abiword -- collaborative text editor/word processor usable as a GTK widget that can be embedded in other activities
  • SQLite -- lightweight relational database
  • XULRunner (with Python DOM-capable bindings) -- Gecko 1.9 (Firefox 3.x) engine
  • GStreamer -- general purpose media streaming platform, used for accessing the video camera and playing media
  • Avahi -- discovery and advertising mechanism for mesh-hosted services

Common libraries not available:

  • OpenGL
  • Server-based relational databases (MySQL, PostgreSQL)
  • If you are unsure whether something is supported, ask, or load up an emulated machine and check for the presence of the library

Testing/working:

  • Announce your project on the OLPC devel list so that people know what you are working on and duplication of effort is reduced
  • Add your project to the Software projects page
  • Test your application in an official image (or a physical laptop) before publishing broadly
  • To conserve memory or improve performance, consider replacing problematic areas in your Python code with C. For example, a rewrite of the hardware manager service in C saved 1.8 megabytes of private dirty memory. On a machine with only 256 megabytes of RAM and no swap space, efficient use of memory can make the difference between a usable system and a system made unreliable by out-of-memory failures.
  • Distribute your source code under the GPL, LGPL or MIT license.
  • When ready to test with real users add your activity to the Activities page to allow for easy download and installation

Previous Up Next