You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by rg...@apache.org on 2012/01/06 12:32:12 UTC

svn commit: r1228112 - /incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext

Author: rgardler
Date: Fri Jan  6 11:32:11 2012
New Revision: 1228112

URL: http://svn.apache.org/viewvc?rev=1228112&view=rev
Log:
Add some notes on generic widget creation (taken from an email from Scott Wilson)

Modified:
    incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext

Modified: incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext
URL: http://svn.apache.org/viewvc/incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext?rev=1228112&r1=1228111&r2=1228112&view=diff
==============================================================================
--- incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext (original)
+++ incubator/wookie/site/trunk/content/wookie/docs/widgets.mdtext Fri Jan  6 11:32:11 2012
@@ -23,9 +23,8 @@ that can be hosted in the Wookie Server.
 You will probably want to look at the tutorial found in 
 [http://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/][1]
 
-More specifically the slides in [this open office 
-presentation][2] will walk you through the creation 
-of your first widget.
+These include presentations on creating a [Hello World][2] widget and on
+[basic widget features][8], but take a look there are other materials in there too..
 
 #Widget source directory
 
@@ -114,6 +113,68 @@ command, for example;
 #Automatically deploying at build time
 Widgets will automatically be deployed at build time by default. That is, any widgets found in the widgets directory will be deployed to the webapp when it is rebuilt. you can configure which widgets will be deployed in your local.build.properties files.
 
+# Platform independent widgets
+
+Wookie is capable of serving the widget as a HTML 
+application for embedding in your third party 
+environments such as CMSs, LMSs and blogs. What about
+serving the packaged widget for deployment to widget 
+clients such as Opera Mobile?
+
+Through the [Flatpack API][9] Wookie will serve a widget as 
+a packaged wgt file. This allows it to be hosted in any 
+suitable container. However, there are a few things you need 
+to be careful of when buidling widgets that are intended to 
+be managed by other containers. The sections below discuss 
+some of the issues you may face.
+
+## Wookie specific features
+
+Widgets intended for use outside of Wookie should not use 
+any Wookie-specific features or internal calls. The 
+syntax analyzer outputs warnings about this when you 
+deploy the widget, so its worth paying attention to 
+the log output to see if there is anything that needs 
+fixing.
+
+It is also recommended that you test widgets by opening 
+the .wgt using Opera Mobile, and by putting it through 
+a PhoneGap Build and opening the generated application in 
+the Android Emulator that comes with the Android SDK for 
+Eclipse.
+
+## Platform compatibility
+
+There are quite a few qotchas generally, mostly around 
+things like differences in HTML5 support across different 
+environments. For example the Android browser has poor 
+Canvas support and Opera Widgets doesn't handle referenced 
+audio files. The only realistic way to deal 
+with this is to do a lot of testing, and where possible 
+check for feature availability in scripts before making
+calls.
+
+## Development for browser and mobile applications
+
+The following is a development and test cycle that has been
+found to work for some developers.
+
+  1. develop the widget for in-browser use only, 
+     and test in a range of browsers including the 
+     Android browser, IOS Safari, and Opera Mobile
+  2. test for existence of window.widget and if available enable widget features like preferences and metadata
+  3. add features needed in config.xml, but make them optional, and test for availability in scripts before enabling them in the widget UI
+  4. create .wgt package
+  5. upload to PhoneGap build to create mobile apps
+
+Its not exactly foolproof and automatic, and there are 
+still problems, but if you are "serious" 
+about widget development this basic 
+approach can be used to get widgets working correctly 
+across most platforms.
+
+Please help us improve on this documented process.
+
 #Third Party Materials
 This section links to third party materials about building Wookie Widgets.
 
@@ -138,9 +199,11 @@ This section links to widgets hosted out
 
 
   [1]: http://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/
-  [2]: http://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/firstWidget.odp
+  [2]: http://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/tutorial_1_hello_world.odp
   [3]: http://people.kmi.open.ac.uk/ullmann/tutorials/wookie/widget.htm
   [4]: http://people.kmi.open.ac.uk/ullmann/tutorials/wookie/widgetUploadWookie.htm
   [5]: http://marxjohnson.github.com/MultiXinha/
   [6]: https://github.com/scottbw/pacman
-  [7]: http://arc.tees.ac.uk/wider/index.php?p=widgets&from=0&number=10
\ No newline at end of file
+  [7]: http://arc.tees.ac.uk/wider/index.php?p=widgets&from=0&number=10
+  [8]: http://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/tutorial_2_basic_interactions.odp
+  [9]: http://incubator.apache.org/wookie/docs/api.html
\ No newline at end of file