16
Widgets Meetup, London, 13 Oct 2009 Wookies and Widgets Scott Wilson (University of Bolton) Scott. bradley [email protected]

Wookie Meetup

  • Upload
    scottw

  • View
    2.158

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Wookie Meetup

Widgets Meetup, London, 13 Oct 2009

Wookies and Widgets

Scott Wilson (University of Bolton)

[email protected]

Twitter: scottbw

Page 2: Wookie Meetup

Wookie is not a clever acronym

(so if you spell it WOOKIE you’re shouting!)

Page 3: Wookie Meetup

Apache Wookie (incubating)

• Entered incubator July ‘09

• originally developed in Framework 6 IP– Funded projects tend to build prototypes,

not communities

• http://incubator.apache.org/wookie/

Page 4: Wookie Meetup

How Wookie Works

• Servlet, runs in Tomcat or Jetty• Provides REST API for applications to

access widgets using a plug-in• Provides JavaScript API objects for

widgets at runtime• Admin UI for installing and managing

W3C Widgets• Server-side storage, and push events

Page 5: Wookie Meetup

Wookie REST API

• GET /widgets gets the list of widgets installed• POST /widgetinstances instantiates a widget• POST /participants adds a participant to a

widget instance• Lots more at

http://incubator.apache.org/wookie/wookie-rest-api.html

Page 6: Wookie Meetup

Typical lifecycle

• GET /widgets -> render as a gallery for the user to pick which one to add

• POST /widgetinstances -> create an instance of the widget for the user, returns the URI and widget height/width

• POST /participants -> add user as a participant in the instance

• Create iframe with src, height and width set

Page 7: Wookie Meetup

Plugins

• LAMS

• Moodle

• Wordpress (needs improving)

• Elgg 1.0 (needs improving)

Page 8: Wookie Meetup

Widget APIs

<feature name="http://wave.google.com" required="true"/>

• W3C Widget Object (default)• Google Wave Gadget API• Bondi camera API• SCORM CMI API• … anything else!

Page 9: Wookie Meetup

Shindig integration

• Basic integration, adds Shindig servlet in install

• Wookie generates tokens for shindig opensocial applications

• Wookie handles getPref/setPref using W3C Widget object

• Doesn’t handle Shindig data interface• Needs more work!

Page 10: Wookie Meetup

Proposed features

• Inter-widget communications (IWC)

• More bondi/DAP APIs

Page 11: Wookie Meetup

Anatomy of a Widget

• Config.xml <- W3C Widgets P&C Spec

• Icon

• HTML start file

• JavaScript code

• Zip it up, change ext to .wgt, and you’re done

Page 12: Wookie Meetup

A Silly Example: config.xml

<?xml version="1.0" encoding="utf-8"?><widget xmlns="http://www.w3.org/ns/widgets"

id="http://www.getwookie.org/widgets/tea" version="1.0” height="150” width="125"><name>Tea</name><description>A silly Tea widget</description><icon src="tea.jpg"/><content src="index.htm"/><feature name="http://wave.google.com" required="true"/><author>Scott Wilson</author>

</widget>

Page 13: Wookie Meetup

A Silly Example: HTML & JS

<html><body onload="document.getElementById(‘name’).innerText=wave.getViewer().getDisplayName()">

<img src="tea.jpg" /> <p style="font-size:9pt">Time for a break, <span id="name">mate</span></p>

</body></html>

Page 14: Wookie Meetup

Cooler example: webcam<html>

<head><script>

function takePicture(){ var camera = bondi.camera.getCameras()[0]; camera.takePicture(function(x){document.getElementById("picture").src=x;},function(){alert("nope");}); }

</script> </head> <body>

<button onclick="takePicture()">Take Picture</button><img id="picture" src="" width="64" height="64"/>

</body></html>

Page 15: Wookie Meetup

Future stuff

• Wookie hosting? UK/EU App Store?

• SocialSite integration

• Better Shindig integration

• OpenAjax stuff?

Page 16: Wookie Meetup

Get involved!

• Send subscribe message to [email protected]

• Submit issue reports, feature requests, patches: http://issues.apache.org/jira/browse/WOOKIE