Difference between revisions of "MarketingTeam/TODO/What's New for Developers/Sugar 0.84"
(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! | |
− |
Latest revision as of 11: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!