Features/SimpleActivity

From Sugar Labs
< Features
Revision as of 16:58, 21 November 2013 by Agustin Zubiaga Sanchez (talk | contribs) (Created page with "== Summary == SimpleActivity is a module that make some things that every activity do in a simpler way, and also it provides a much simpler way to implement sharing in your ac...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

SimpleActivity is a module that make some things that every activity do in a simpler way, and also it provides a much simpler way to implement sharing in your activity.

Owner

Current status

  • Last updated: 21/11/13
  • Percentage of completion: "100%"

Detailed Description

We have a lot of repeated-code in our activities, and why not make some things simpler, like create the toolbar automatically with the activity icon. Also it includes SharedActivity which is a class that derives from SimpleActivity, and does all the collaboration process by itself, you don't have to worry about dbus, tubes, telepathy, even about the service, path or interface name, SharedActivity will do everything for you. You just have to define a list of "events" that you have to define with the respective callbacks to execute when that event is received, and then start sending events!

Benefit to Sugar

Since this module can make a lot of processes in a very simple way, starter-developers can make his own Sugar Activity, much easier, and in this way we can get much more activities, and other very interesting things.

Scope

Really, it doesn't stop anything working, developers can use SimpleActivity/SharedActivtiy and continue doing everything that did before, you can use its methods to add a button, or manually like before.

How To Test

You can clone this demo activity which uses many SimpleActivity's features.

User Experience

Actually, the user won't be feel the difference, but we can make more Activities for him/her!

Dependencies

Nothing, just copy simpleactivity.py into your activity directory, and make everything simpler!

Documentation

You can found the documentation in docstrings for now. Web docs soon.

Release Notes

Comments and Discussion