+
Widgets

Scott Wilson
scottbw@apache.org
http://incubator.apache.org/wookie
Here is a mad idea

 lets make mobile
apps using JUST html
   and javascript

  i wonder what
 Google and Apple
      think?
“no software developer kit is
  required for the iPhone.”
          Steve Jobs, 2007
“App stores are not the
 future”, says Google (FT 2009)
Java!




 Objective-C!




WTF?
Widgets
  HTML
                config.xml
JavaScript

   CSS              Icon.png

     mywidget.wgt
W3C Widgets: for Web,
       Mobile, or Desktop?



Apple Dashboard   OpenSocial       Nokia Widgets
Windows Sidebar   Google Gadgets   iPhone Apps
Google Desktop    Google Wave      Android Apps
Konfabulator        Gadgets        Widsets
Opera Widgets     WidgetBox
                  SpringWidgets
How about, “yes”?
Device APIs: Adding
   Handset Capabilities to
         JavaScript
               •   Address Book
               •   Calendar
• BONDI
               •   Files
               •   Media capture
• W3 DAP           (camera)
               •   Messaging
• W3 Geo       •   System
               •   Policy
               •   Media Gallery
               •   Tasks
  JavaScript   •   Comms Log
<html>
  <head>
         <script>
  function takePicture(){
  var camera = bondi.camera.getCameras()[0];
  camera.takePicture(function(pic){document.getElementBy
  Id("picture").src=pic;},function(){alert("nope");});
  }
         </script>
  </head>
  <body>
      <button onclick="takePicture()">Take
  Picture</button>
         <img id="picture" src="" width="64" height="64"/>
  </body>
</html>
Feature mapping
<feature
  name=“http://bondi.omtp.org/api/camera.capture”
   required=“true”
/>




   JavaScript
Feature mixing!
<feature name=“http://opensocial.org/osapi.person”
  required=“true”/>

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

You can connect all kinds of functionality to widgets by
  injecting a JS API for it at runtime - and not just device
  APIs either

    Did you know that Opera Unite services were W3C Widgets?



    JavaScript
“W3C Widgets are better than websites
  because they download only the data;
  and not the core files.”

“Widgets are better than app systems
  because you don't have to write 4, 5, or
  10 of them. Just the one is enough.”

“And hundreds of thousands of web
  developers already know how to create
  widgets.It's just HTML/CSS/JavaScript,
  after all.”

- Peter Paul Koch
So is this W3C
thing going to
  take off?
“A fundamental part of WAC is to ensure that developers have the
simplest method by which they can create applications for the long tail.
A key part of this is to endorse and encourage the use of technologies
which are based around open standards. WAC plans to initially use both
the JIL and OMTP BONDI requirements, evolving these into a common
specification within the next 12 months. The long term goal will be to
collectively work with the W3C for a common standard based on our
converged solution.”
OK, so how Could
  you get this
 into Android?
“I came here to ask if it's possible Google
   Android will support W3C Widgets not
   instead of but in addition to its own app
   system.”

“We need:
- a browser (Android WebKit will do perfectly
  fine, thanks)
- a way of associating .wgt files with this
  browser OR an installation mechanism
- JavaScript device APIs”

   – PPK
A Java server application in
              the Apache Incubator.
              Includes a W3C Widget
              parser library.


* “Wookie” is not a clever acronym. so if you spell it WOOKIE you’re shouting!
Other possibilities…
• Feature extensions beyond BONDI/DAP
  ..?
• Widget and feature extensions for “other”
  platforms. E.g. Android on TVs, kiosks,
  uncategorizable gizmos etc
• Android+W3C Widget powered Chumby-
  like-things?
Thanks
scottbw@apache.org
@scottbw
http://incubator.apache.org/wookie

Android

  • 1.
  • 2.
    Here is amad idea lets make mobile apps using JUST html and javascript i wonder what Google and Apple think?
  • 3.
    “no software developerkit is required for the iPhone.” Steve Jobs, 2007
  • 4.
    “App stores arenot the future”, says Google (FT 2009)
  • 5.
  • 6.
    Widgets HTML config.xml JavaScript CSS Icon.png mywidget.wgt
  • 7.
    W3C Widgets: forWeb, Mobile, or Desktop? Apple Dashboard OpenSocial Nokia Widgets Windows Sidebar Google Gadgets iPhone Apps Google Desktop Google Wave Android Apps Konfabulator Gadgets Widsets Opera Widgets WidgetBox SpringWidgets
  • 8.
  • 9.
    Device APIs: Adding Handset Capabilities to JavaScript • Address Book • Calendar • BONDI • Files • Media capture • W3 DAP (camera) • Messaging • W3 Geo • System • Policy • Media Gallery • Tasks JavaScript • Comms Log
  • 10.
    <html> <head> <script> function takePicture(){ var camera = bondi.camera.getCameras()[0]; camera.takePicture(function(pic){document.getElementBy Id("picture").src=pic;},function(){alert("nope");}); } </script> </head> <body> <button onclick="takePicture()">Take Picture</button> <img id="picture" src="" width="64" height="64"/> </body> </html>
  • 11.
    Feature mapping <feature name=“http://bondi.omtp.org/api/camera.capture” required=“true” /> JavaScript
  • 12.
    Feature mixing! <feature name=“http://opensocial.org/osapi.person” required=“true”/> <feature name=“http://wave.google.com” required=“true”/> You can connect all kinds of functionality to widgets by injecting a JS API for it at runtime - and not just device APIs either Did you know that Opera Unite services were W3C Widgets? JavaScript
  • 13.
    “W3C Widgets arebetter than websites because they download only the data; and not the core files.” “Widgets are better than app systems because you don't have to write 4, 5, or 10 of them. Just the one is enough.” “And hundreds of thousands of web developers already know how to create widgets.It's just HTML/CSS/JavaScript, after all.” - Peter Paul Koch
  • 14.
    So is thisW3C thing going to take off?
  • 18.
    “A fundamental partof WAC is to ensure that developers have the simplest method by which they can create applications for the long tail. A key part of this is to endorse and encourage the use of technologies which are based around open standards. WAC plans to initially use both the JIL and OMTP BONDI requirements, evolving these into a common specification within the next 12 months. The long term goal will be to collectively work with the W3C for a common standard based on our converged solution.”
  • 19.
    OK, so howCould you get this into Android?
  • 20.
    “I came hereto ask if it's possible Google Android will support W3C Widgets not instead of but in addition to its own app system.” “We need: - a browser (Android WebKit will do perfectly fine, thanks) - a way of associating .wgt files with this browser OR an installation mechanism - JavaScript device APIs” – PPK
  • 21.
    A Java serverapplication in the Apache Incubator. Includes a W3C Widget parser library. * “Wookie” is not a clever acronym. so if you spell it WOOKIE you’re shouting!
  • 23.
    Other possibilities… • Featureextensions beyond BONDI/DAP ..? • Widget and feature extensions for “other” platforms. E.g. Android on TVs, kiosks, uncategorizable gizmos etc • Android+W3C Widget powered Chumby- like-things?
  • 24.