Jump to: navigation, search

HTML5 activities

1,670 bytes added, 09:58, 3 October 2013
GSoC Timeline progress
HTML5 activities will be run via a WebKit instance. A JavaScript framework will expose Sugar Features to HTML5 activities. Specifically, this framework will allow to use HTML controls matching the Sugar widgets look&feel and will expose common and customized activity toolbars. The framework will also expose API for handling Telepathy (communication and collaboration between multiple Sugar machine) and Datastore (Sugar Journal reading and writing).
The following schema sum up HTML5 activities functional architecture.
[[File:SugarWebApp Architecture.svg|400px|center]]
= History =
The very first Web Activity is [ Wikipedia]. Wikipedia is a Python activity embedding a WebView to display HTML Wikipedia pages. Searching and browsing is available from a standard Python toolbar. Clicking on a toolbar button change the current HTML viewed HTML page or launch an history command (previous/next). To communicate from HTML to Python, Wikipedia embedd embed an [ HTTP Server]. When a hyperlink is clicked in the HTML page it call the HTTP server then launch any run Python code.
[ Foodchain] is another attempt to write HTML5 activities. In FoodChain there is no embedded HTTP Server. Communication from Python to JavaScript use the WebKit "[ execute_script]" command. Communication from JavaScript to Python use the WebKit "[ console.log]" function with the a hack on the WebKit "console-message". In both way of communication, all data exchange between Python and JavaScript are converted in JSON.Two others activities use the same way of workingframework: [ Grid paint] and [ Abecedarium]. The framework is described [ here].
= Current works =
HTML5 activities has been choose[] as a feature for Sugar 0.100.HTML5 activities will be build on WebKit2 but if time permits we will implement compatibility with previous releases running WebKit1.HTML5 activities is accepted a project for [[Summer of Code/2013]].
== IPC Communication ==A technical architecture is described [ here].Historic implementation (Wikipedia and Foodchain) use hacky ways The procedure to handle communication between Sugar and JavaScriptcreate a web activity using from a common template is described [ We need a more performance way to communicate (send API call and data)html here].
Daniel explore communication using WebSocket Some interesting discussion around this subject in the community:* Sugar Web Architecture []* Sugar Web UI []* Localization []* Renaming HTML --> Web []* Running HTML5 activity on other platforms []* How to deploy framework in the activity []* Datastore API [][]* Unit Testing []* Webkit1/Webkit2 compatibility []
== Sugar HTML Framework ===== Sugar UI ==TODO List =This part See TODO list of the framework should expose HTML controls matching the Sugar widgets look&feel and common and customized activity toolbarsproject on [].
Manuel has done some research about components to do that [].
=GSoC Timeline progress == Datastore ===This part of * Week 1: Working sugar-build environment, create a new activity []* Week 2: Develop the framework should expose Datastore RadioButton and CheckBox in Sugar HTML UI, sample here: [], start a new Sugar HTML API into JavaScript.* Week 3: Start developing the Sugar Activity PaletteTODO* Week 4: Working on DataStore handling to Activity Palette, solved issue on new Sugar HTML API* Week 5: Publish a first [ blog post] on its work, try to fix an issue regarding popup on home view=== Telepathy ===This part * Week 6: First mock-up and specification of the framework should expose Telepathy API into JavaScript.Markdown activity a Markdown format editor TODO === Template ===A template will be provide to developers to write its own * Week 7: First version of Markdown activity[http://surajgillespie.github. This template will include io/]* Week 8-9-10: Object Chooser integration in the Sugar HTML FrameworkMarkdown activity Daniel has wrote * Week 11: Publish a first template version of Markdown activity in [ Sugar App Store].Work on an issue in the DataStore JavaScript API  == HTML Activities ==HTML activities will be developed * Week 12: Solve issue in parallel with the framework developpement. DataStore JavaScript API, work on a new blog post* Week 13: Write a new version of Markdown activity, work on setting of preview metadata in webactivityManuel has started to port * Week 14: Publish the Clock activity using HTML5 Canvas new version of [ Markdown activity], Final [ post].

Navigation menu