[Sugar-devel] How to deploy the webactivity libraries
simon at schampijer.de
Wed May 29 06:29:28 EDT 2013
we talked yesterday on irc about how to handle the deployment of the
webactivity libraries like sugar-html-graphics. We came up with three
basic ways of dealing with it. It follows a summary. Please comment,
fill in the missing items. It is an interesting item that needs
discussion and research before we decide on using one or the other.
===Include a copy of the library in each webactivity===
Each activity carries a copy of the libraries it uses. For example
sugar-html-activity and sugar-html-graphics. This has the advantage that
the activities are self contained. The downside is that for a change in
the library each activity has to be updated.
This is the current common model for webapps. With nodejs for example
every library you install uses its own dependencies so that it can use
specific versions and not have to deal with API breaks etc. If webapp X,
needs a fix that is only available in sugar-html-graphics 1.5 it can
pull in that dependency and run on the same system as webapp Y with
An interesting case is when a library fix is made how to deploy that for
20 webactivities. This could be made independent of the maintainers
duty. If a downstream wants to deploy webapp X when aggregating the
webapps could pull in their latest dependencies (unless a specific
version is specified).
===Import from a web url and pre caching===
This requires a permission system. This has general security concerns.
===load the library from the filesystem===
The activity loads the library from the filesystem something like:
/usr/share/sugar/sugar-html-activity/activity.js The advantage here is
that you only have to modify one place when a change to the library is
made and all the activities get it directly. There might be security
concerns here as well.
In webOS the framework is available from the system "Unlike most
your application code since Palm includes the framework in every webOS
 webOS framework:
More information about the Sugar-devel