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...) |
|||
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 | + | The new version of Sugar has made a lot of progress in our goal of |
− | + | encouraging users to appropriate the technology. We don't want our users to be just consumers, we would like them to feel | |
− | + | empowered to learn how things are done. That's why we have been | |
− | empowered to | ||
working towards making it as easy as possible to modify Sugar itself | working towards making it as easy as possible to modify Sugar itself | ||
to better suit <em>their</em> personal and collective needs. | to better suit <em>their</em> personal and collective needs. | ||
− | There are two aspects | + | There are two aspects in Sugar that remove the limits from what can |
− | be done with 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>. | href="http://en.wikipedia.org/wiki/Free_software">Free Software</a>. | ||
Python is an interpreted programming language that is very easy to | Python is an interpreted programming language that is very easy to | ||
− | understand and modify | + | 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 | |
− | content and between consumer and producer are | + | content and between consumer and producer are obstacles inherent in the |
− | <em>now</em> traditional software and media industries | + | <em>now</em> traditional software and media industries. Our work has focused on three features of Sugar that lower the barriers for |
− | + | people that 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. | |
− | 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 earlier releases, only Etoys, and some simple activities like Chat |
− | and Read had | + | and Read, had any built-in ability for displaying their source code. For Sugar |
− | 0.84, we have extended to all | + | 0.84, we have extended this capability to all activities, so users can drill |
− | deeper | + | 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 | are written in an interpreted language like Python, but if a compiled | ||
− | activity also ships | + | 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> | ||
− | The authors of activities like Browse and TurtleArt might | + | The authors of activities like Browse and TurtleArt might want to give |
− | + | special <em>code drilling</em> capabilities to these activities, so their | |
− | users can see how | + | users can see how programs in TurtleArt would look in Logo, or |
curious readers can peek into the HTML code of a web page. | 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 | + | the source viewing 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.Activity-class.html">Activity.handle_view_source</a> | ||
− | method | + | method. This will replace the standard dialog that would be displayed by |
− | the default implementation. And if | + | the default implementation. And if one intends only to provide an |
additional source file to the default dialog, then | additional source file to the default dialog, then | ||
<a>Activity.get_document_path</a> can be overridden. | <a>Activity.get_document_path</a> can be overridden. | ||
− | Authors of activities written in other | + | 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 54: | Line 51: | ||
<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, add a new device to the | ||
− | Frame or define a keyboard shortcut. You only need to | + | Frame, or define a keyboard shortcut. You only need to place your Python |
− | code, following the API guidelines, at | + | code, following the API guidelines, at the right place, and the |
− | extension | + | extension will be 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 present moment, and will be reviewed in the next release |
− | cycle. | + | cycle. Nevertheless, people have been writing little widgets, like a |
− | clock, for the Frame already. Have a look <a> | + | clock, for the Frame already. Have a look at <a>@@@@@@@</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 building blocks. | + | platform</a> provides several sets of tools that can be used as building blocks. |
− | One | + | 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. |
− | |||
− | |||
− | |||
− | Embedding Mozilla | + | Embedding Mozilla into your activity will give it browser abilities, like |
− | rendering html and executing javascript. For | + | 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>. | ||
− | + | 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. | + | those found in word processors. It also offers collaboration that allows |
− | several users of your activity | + | several users of your activity to edit a text buffer simultaneously |
− | across the network. You can base | + | 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 | + | 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>. | ||
− | + | Now, stop reading this static code, and get busy coding some live activities for all the children of the world! [please suggest | |
a better final word] | a better final word] |
Revision as of 01:51, 18 March 2009
Sugar 0.84: What's new for developers
The new version of Sugar has made a lot of progress in our goal of encouraging users to appropriate the technology. We don't want our users to be just consumers, we would like them to feel 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 their personal and collective needs.
There are two aspects in Sugar that remove the limits from what can 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 content and between consumer and producer are obstacles inherent in the now traditional software and media industries. Our work has focused on three features of Sugar that lower the barriers for people that 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.
View source
In earlier releases, only Etoys, and some simple activities like Chat 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>
The authors of activities like Browse and TurtleArt might want to give special code drilling capabilities to these activities, so their users can see how programs in TurtleArt would look in Logo, or 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 source viewing by herself can override the <a href="http://api.sugarlabs.org/sugar.activity.activity.Activity-class.html">Activity.handle_view_source</a> method. This will replace the standard dialog that would be displayed by the default implementation. And if one intends only to provide an 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 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, add a new device to the Frame, or define a keyboard shortcut. You only need to place your Python code, following the API guidelines, at the right place, and the extension will be picked up by the shell on startup, automatically. The API is unstable for the present 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 at <a>@@@@@@@</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 tools that can be used as 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.
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>.
Now, stop reading this static code, and get busy coding some live activities for all the children of the world! [please suggest a better final word]