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

From Sugar Labs
Jump to navigation Jump to search
(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 to
+
The new version of Sugar has made a lot of progress in our goal of
encourage the users to appropriate the technology. We don't think it's
+
encouraging users to appropriate the technology. We don't want our users to be just consumers, we would like them to feel
fine with our users to be just consumers so we would like them to feel
+
empowered to learn how things are done. That's why we have been
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
 
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 of Sugar that remove the ceiling about what can
+
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
+
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, and being Free Software means that users have
+
understand and modify. Being Free Software, means that users have
the rights to use, modify and redistribute it.
+
full rights to use, modify, and redistribute it.
  
Operating under the belief that the separations between code and
+
We operate under the belief that the separations between code and
content and between consumer and producer are artifacts of the
+
content and between consumer and producer are obstacles inherent in the
<em>now</em> traditional software and media industries, we have been
+
<em>now</em> traditional software and media industries. Our work has focused on three features of Sugar that lower the barriers for
working during the last months on three areas that lower the floor 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 some capability of displaying their source code. For
+
and Read, had any built-in ability for displaying their source code. For Sugar
0.84, we have extended to all of them this capability of drilling
+
0.84, we have extended this capability to all activities, so users can drill
deeper on how things are done. It will work better for activities that
+
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 the source code, users will be able to read it
+
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.
and, since Sugar users are all smart people, understand how it works.
 
  
 
<screenshot>
 
<screenshot>
  
The authors of activities like Browse and TurtleArt might wish to give
+
The authors of activities like Browse and TurtleArt might want to give
some special <em>drilling</em> capability to their activity, so the
+
special <em>code drilling</em> capabilities to these activities, so their
users can see how their programs in TurtleArt would look in Logo, or
+
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 view source by herself can override the <a
+
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, thus replacing the standard dialog that would be displayed by
+
method. This will replace the standard dialog that would be displayed by
the default implementation. And if it's only intended to provide an
+
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 languages than Python can
+
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 put your python
+
Frame, or define a keyboard shortcut. You only need to place your Python
code, following the API guidelines, at a certain place and the
+
code, following the API guidelines, at the right place, and the
extension is picked up by the shell on startup automatically. The API
+
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. 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 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 of those is Etoys, you have a Squeak virtual machine on which you
+
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.
can base your activities and also the Etoys environment is available
 
to give the users of your activity an advanced interactive
 
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
+
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]