Difference between revisions of "MarketingTeam/TODO/What's New for Developers/Sugar 0.84"

(New page: Sugar 0.84: What's new for developers The new version of Sugar has made a lot of progress in our goal to encourage the users to appropriate the technology. We don't think it's fine with o...)
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
Sugar 0.84: What's new for developers
 
Sugar 0.84: What's new for developers
  
The new version of Sugar has made a lot of progress in our goal to
+
With the new version of Sugar, 0.84, we have made a lot of progress in our goal to encourage Sugar users to appropriate the technology. We do not think that our users should be satisfied to be just consumers of Sugar; we would like them to understand how Sugar works and to feel
encourage the users to appropriate the technology. We don't think it's
+
empowered to make improvements. This is why we have been working towards making it as easy as possible for them to modify Sugar such that it is better suited to <em>their</em> personal and collective needs.
fine with our users to be just consumers so we would like them to feel
 
empowered to understand how things are done. That's why we have been
 
working towards making it as easy as possible to modify Sugar itself
 
to better suit <em>their</em> personal and collective needs.
 
  
There are two aspects of Sugar that remove the ceiling about what can
+
There are two aspects of Sugar that are sympathetic to our goal of user modifications: (1) it is written in Python; and (2) it is distributed as <a href="http://en.wikipedia.org/wiki/Free_software">Free Software</a>. Python is an interpreted programming language that is very easy to understand and modify, and being Free Software means that users have the rights to use, modify and redistribute it.
be done with it: it's written in Python and it's distributed as <a
 
href="http://en.wikipedia.org/wiki/Free_software">Free Software</a>.
 
Python is an interpreted programming language that is very easy to
 
understand and modify, and being Free Software means that users have
 
the rights to use, modify and redistribute it.
 
  
Operating under the belief that the separations between code and
+
Operating under the belief that the separations between code and content and between consumer and producer are artifacts of the <em>old</em> software and media industries, we have been working during the last months on three areas that lower the barriers to entry for people that wish to modify Sugar. We call the removing of limits on possibilities, *removing the ceiling*, and the lowering or easing of entry ramps, *lowering the floor* for computing success.
content and between consumer and producer are artifacts of the
 
<em>now</em> traditional software and media industries, we have been
 
working during the last months on three areas that lower the floor for
 
people that wish to modify Sugar.
 
  
 
<h2>View source</h2>
 
<h2>View source</h2>
  
In earlier releases, only Etoys and some simple activities like Chat
+
In previous releases, only Etoys and some simple activities such as Chat and Read had the capability of displaying their source code, letting the user drill deep into how the activity works. For 0.84, we have extended this ability to every activity. It works better for activities that are written in an interpreted language, e.g., Python, but if a compiled activity includes the source code, users will be able to “view” it and, since Sugar makes people smarter, they'll be able to understand how it works.
and Read had some capability of displaying their source code. For
 
0.84, we have extended to all of them this capability of drilling
 
deeper on how things are done. It will work better for activities that
 
are written in an interpreted language like Python, but if a compiled
 
activity also ships the source code, users will be able to read it
 
and, since Sugar users are all smart people, understand how it works.
 
  
<screenshot>
+
[screenshot from http://wiki.sugarlabs.org/go/DevelopmentTeam/Release/Releases/Sucrose/0.84#View_Source]
  
The authors of activities like Browse and TurtleArt might wish to give
+
The authors of some activities, for example Browse and TurtleArt,
some special <em>drilling</em> capability to their activity, so the
+
provided some additional <em>drilling</em> capability to their
users can see how their programs in TurtleArt would look in Logo, or
+
activities. The users can see how their Turtle Art programs look as
curious readers can peek into the HTML code of a web page.
+
Logo code; curious readers can peek into the HTML code of a web page.
  
 
The author of an activity written in Python that wishes to handle all
 
The author of an activity written in Python that wishes to handle all
 
the view source by herself can override the <a
 
the view source by herself can override the <a
href="http://api.sugarlabs.org/sugar.activity.activity.Activity-class.html">Activity.handle_view_source</a>
+
href="http://api.sugarlabs.org/sugar.activity.activity.Activityclass.html">Activity.handle_view_source</a>
method, thus replacing the standard dialog that would be displayed by
+
method, thus replacing the standard dialog by an activity-specific
the default implementation. And if it's only intended to provide an
+
implementation. And for providing an additional <em>code representation</em> like HTML or Logo, then <a>Activity.get_document_path</a> can be overridden to provide a file path to it.
additional source file to the default dialog, then
 
<a>Activity.get_document_path</a> can be overridden.
 
  
Authors of activities written in other languages than Python can
+
For the same effects, authors of activities written in languages other than Python can
 
implement the methods <em>org.laptop.Activity.HandleViewSource()</em>
 
implement the methods <em>org.laptop.Activity.HandleViewSource()</em>
 
and <em>org.laptop.Activity.GetDocumentPath()</em>, as kindly
 
and <em>org.laptop.Activity.GetDocumentPath()</em>, as kindly
Line 55: Line 34:
  
 
Extending the shell was never that easy. For example you can extend
 
Extending the shell was never that easy. For example you can extend
the Control Panel by adding a new section, add a new device to the
+
the Control Panel by adding a new section, adding a new device to the
Frame or define a keyboard shortcut. You only need to put your python
+
Frame, or defining a new keyboard shortcut. You only need to put your
code, following the API guidelines, at a certain place and the
+
Python code, following the API guidelines, at a certain place and the
 
extension is picked up by the shell on startup automatically. The API
 
extension is picked up by the shell on startup automatically. The API
 
is unstable for the moment and will be reviewed in the next release
 
is unstable for the moment and will be reviewed in the next release
cycle. Neverless, people have been writing little widgets, like a
+
cycle. Nevertheless, people have been writing little widgets, like a
 
clock, for the Frame already. Have a look <a>at</a> on how to do so.
 
clock, for the Frame already. Have a look <a>at</a> on how to do so.
  
<h2>Using Etoys, Mozilla, Abiword and Evince in your activity</h2>
+
<h2>Using Etoys, Mozilla, Abiword, and Evince in your activity</h2>
  
 
The <a href="http://wiki.sugarlabs.org/go/DevelopmentTeam/SugarPlatform/0.84">Sugar
 
The <a href="http://wiki.sugarlabs.org/go/DevelopmentTeam/SugarPlatform/0.84">Sugar
Line 73: Line 52:
 
environment.
 
environment.
  
Embedding Mozilla in your activity will give it browser abilities like
+
Embedding Mozilla into your activity will give it browser abilities, like
rendering html and executing javascript. For python activities, run
+
rendering html and executing javascript. For Python activities, run
 
'pydoc hulahop' or check out the <a
 
'pydoc hulahop' or check out the <a
 
href="http://git.sugarlabs.org/projects/browse">Browse sources</a>.
 
href="http://git.sugarlabs.org/projects/browse">Browse sources</a>.
Watch out for better integration with the web in 0.86.
+
You can watch for even better integration with the web in Sugar 0.86.
  
Abiword offers a powerful text widget with advanced features like
+
Abiword offers a powerful text processing widget with advanced features like
those found in word processors. But also offers collaboration so
+
those found in word processors. It also offers collaboration that allows
several users of your activity can edit a text buffer simultaneously
+
several users of your activity to edit a text buffer simultaneously
across the network. You can base yourself on <a
+
across the network. You can base your work on <a
 
href="http://git.sugarlabs.org/projects/write">Write's source code</a>
 
href="http://git.sugarlabs.org/projects/write">Write's source code</a>
 
or run 'pydoc abiword'.
 
or run 'pydoc abiword'.
  
Evince is a document viewer that will render PDF, PostScript and other
+
Evince is a document viewer that will render PDF, PostScript, and other document
formats in an area in your activity's window. Python coders can check
+
formats within an area of your activity's window. Python coders can check
 
'pydoc evince' or see <a
 
'pydoc evince' or see <a
 
href="http://git.sugarlabs.org/projects/read">Read's source code</a>.
 
href="http://git.sugarlabs.org/projects/read">Read's source code</a>.
  
Stop reading nonsense and start coding, you lazy bums! [please suggest
+
And now, stop reading nonsense and start coding, you lazy potential hackers!
a better final word]
 

Latest revision as of 12:19, 19 March 2009

Sugar 0.84: What's new for developers

With the new version of Sugar, 0.84, we have made a lot of progress in our goal to encourage Sugar users to appropriate the technology. We do not think that our users should be satisfied to be just consumers of Sugar; we would like them to understand how Sugar works and to feel empowered to make improvements. This is why we have been working towards making it as easy as possible for them to modify Sugar such that it is better suited to their personal and collective needs.

There are two aspects of Sugar that are sympathetic to our goal of user modifications: (1) it is written in Python; and (2) it is distributed as <a href="http://en.wikipedia.org/wiki/Free_software">Free Software</a>. Python is an interpreted programming language that is very easy to understand and modify, and being Free Software means that users have the rights to use, modify and redistribute it.

Operating under the belief that the separations between code and content and between consumer and producer are artifacts of the old software and media industries, we have been working during the last months on three areas that lower the barriers to entry for people that wish to modify Sugar. We call the removing of limits on possibilities, *removing the ceiling*, and the lowering or easing of entry ramps, *lowering the floor* for computing success.

View source

In previous releases, only Etoys and some simple activities such as Chat and Read had the capability of displaying their source code, letting the user drill deep into how the activity works. For 0.84, we have extended this ability to every activity. It works better for activities that are written in an interpreted language, e.g., Python, but if a compiled activity includes the source code, users will be able to “view” it and, since Sugar makes people smarter, they'll be able to understand how it works.

[screenshot from http://wiki.sugarlabs.org/go/DevelopmentTeam/Release/Releases/Sucrose/0.84#View_Source]

The authors of some activities, for example Browse and TurtleArt, provided some additional drilling capability to their activities. The users can see how their Turtle Art programs look as Logo code; curious readers can peek into the HTML code of a web page.

The author of an activity written in Python that wishes to handle all the view source by herself can override the <a href="http://api.sugarlabs.org/sugar.activity.activity.Activityclass.html">Activity.handle_view_source</a> method, thus replacing the standard dialog by an activity-specific implementation. And for providing an additional code representation like HTML or Logo, then <a>Activity.get_document_path</a> can be overridden to provide a file path to it.

For the same effects, authors of activities written in languages other than Python can implement the methods org.laptop.Activity.HandleViewSource() and org.laptop.Activity.GetDocumentPath(), as kindly documented by Bert Freudenberg <a href="http://wiki.laptop.org/go/Low-level_Activity_API#D-Bus_Methods">here</a>.

Extending the Sugar shell

Extending the shell was never that easy. For example you can extend the Control Panel by adding a new section, adding a new device to the Frame, or defining a new keyboard shortcut. You only need to put your Python code, following the API guidelines, at a certain place and the extension is picked up by the shell on startup automatically. The API is unstable for the moment and will be reviewed in the next release cycle. Nevertheless, people have been writing little widgets, like a clock, for the Frame already. Have a look <a>at</a> on how to do so.

Using Etoys, Mozilla, Abiword, and Evince in your activity

The <a href="http://wiki.sugarlabs.org/go/DevelopmentTeam/SugarPlatform/0.84">Sugar platform</a> provides several sets of building blocks.

One of those is Etoys, you have a Squeak virtual machine on which you can base your activities and also the Etoys environment is available to give the users of your activity an advanced interactive environment.

Embedding Mozilla into your activity will give it browser abilities, like rendering html and executing javascript. For Python activities, run 'pydoc hulahop' or check out the <a href="http://git.sugarlabs.org/projects/browse">Browse sources</a>. You can watch for even better integration with the web in Sugar 0.86.

Abiword offers a powerful text processing widget with advanced features like those found in word processors. It also offers collaboration that allows several users of your activity to edit a text buffer simultaneously across the network. You can base your work on <a href="http://git.sugarlabs.org/projects/write">Write's source code</a> or run 'pydoc abiword'.

Evince is a document viewer that will render PDF, PostScript, and other document formats within an area of your activity's window. Python coders can check 'pydoc evince' or see <a href="http://git.sugarlabs.org/projects/read">Read's source code</a>.

And now, stop reading nonsense and start coding, you lazy potential hackers!