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 of
| + | 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 |
− | encouraging users to appropriate the technology. We don't want our users to be just consumers, we would like them 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 learn 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 in Sugar that remove the limits from 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. Being Free Software, means that users have | |
− | full rights to use, modify, and redistribute it.
| |
| | | |
− | We operate 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 obstacles inherent in the | |
− | <em>now</em> traditional software and media industries. Our work has focused on three features of Sugar that lower the barriers for | |
− | people who wish to modify Sugar. We call the removing of limits on possibilities, *raising the ceiling*, and the lowering or easing of entry ramps, *lowering the floor* for computing success. | |
| | | |
| <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 any built-in ability for displaying their source code. For Sugar | |
− | 0.84, we have extended this capability to all activities, so users can drill | |
− | deeper into how things are done. This feature works better for activities that
| |
− | are written in an interpreted language like Python, but if a compiled | |
− | activity also ships its source code, users will be able to read it as well. Since Sugar users are growing smarter and smarter every day, they soon understand how it all works and will make even better versions for us all. | |
| | | |
− | <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 want to give | + | The authors of some activities, for example Browse and TurtleArt, |
− | special <em>code drilling</em> capabilities to these activities, so their
| + | provided some additional <em>drilling</em> capability to their |
− | users can see how 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 source viewing 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. This will replace the standard dialog that would be displayed by | + | method, thus replacing the standard dialog by an activity-specific |
− | the default implementation. And if one intends only 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 languages other 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 51: |
Line 33: |
| <h2>Extending the Sugar shell</h2> | | <h2>Extending the Sugar shell</h2> |
| | | |
− | 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 place your Python | + | Frame, or defining a new keyboard shortcut. You only need to put your |
− | code, following the API guidelines, at the right place, and the | + | Python code, following the API guidelines, at a certain place and the |
− | extension will be 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 present moment, and will be reviewed in the next release | + | 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 at <a>@@@@@@@</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 |
− | platform</a> provides several sets of tools that can be used as building blocks. | + | platform</a> provides several sets of building blocks. |
| | | |
− | One is Etoys, an advanced interactive development environment in the Smalltalk lineage. With it comes the Squeak virtual machine, which will run your activities not only on Sugar, but on Squeak versions available for almost any computer. | + | 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>. |
| | | |
− | Now, stop reading this static code, and get busy coding some live activities for all the children of the world! [please suggest
| + | And now, stop reading nonsense and start coding, you lazy potential hackers! |
− | a better final word]
| |