MarketingTeam/TODO/What's New for Developers/Sugar 0.84: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision 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 | ||
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 <em>their</em> personal and collective needs. | |||
empowered to | |||
working towards making it as easy as possible to modify Sugar | |||
to | |||
There are two aspects | 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. | ||
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 | |||
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 | |||
<em> | |||
people that wish to modify Sugar. | |||
<h2>View source</h2> | <h2>View source</h2> | ||
In | 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 | |||
0.84, we have extended this | |||
are written in an interpreted language | |||
activity | |||
[screenshot from http://wiki.sugarlabs.org/go/DevelopmentTeam/Release/Releases/Sucrose/0.84#View_Source] | |||
The authors of activities | The authors of some activities, for example Browse and TurtleArt, | ||
provided some additional <em>drilling</em> capability to their | |||
users can see how programs | 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 source | the view source by herself can override the <a | ||
href="http://api.sugarlabs.org/sugar.activity.activity. | href="http://api.sugarlabs.org/sugar.activity.activity.Activityclass.html">Activity.handle_view_source</a> | ||
method | method, thus replacing the standard dialog by an activity-specific | ||
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 | |||
<a>Activity.get_document_path</a> can be overridden. | |||
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 51: | Line 33: | ||
<h2>Extending the Sugar shell</h2> | <h2>Extending the Sugar shell</h2> | ||
Extending the shell was never that easy. For example | Extending the shell was never that easy. For example you can extend | ||
the Control Panel by adding a new section, | the Control Panel by adding a new section, adding a new device to the | ||
Frame, or | Frame, or defining a new keyboard shortcut. You only need to put your | ||
code, following the API guidelines, at | Python code, following the API guidelines, at a certain place and the | ||
extension | extension is picked up by the shell on startup automatically. The API | ||
is unstable for the | is unstable for the moment and will be reviewed in the next release | ||
cycle. Nevertheless, 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 | 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 | ||
platform</a> provides several sets of | platform</a> provides several sets of building blocks. | ||
One is Etoys, | 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 | Embedding Mozilla into your activity will give it browser abilities, like | ||
| Line 85: | Line 70: | ||
href="http://git.sugarlabs.org/projects/read">Read's source code</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! | |||