You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by do...@apache.org on 2008/03/07 14:40:33 UTC

svn commit: r634669 - in /incubator/shindig/trunk: java/gadgets/README javascript/README

Author: doll
Date: Fri Mar  7 05:40:29 2008
New Revision: 634669

URL: http://svn.apache.org/viewvc?rev=634669&view=rev
Log:
Fixed up the readme files for SHINDIG-99.
The javascript readme now correctly states the sampleX.html locations and corrects text around the samplecontainer as well.

Please let us know if these are still confusing or have mistakes.



Modified:
    incubator/shindig/trunk/java/gadgets/README
    incubator/shindig/trunk/javascript/README

Modified: incubator/shindig/trunk/java/gadgets/README
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/README?rev=634669&r1=634668&r2=634669&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/README (original)
+++ incubator/shindig/trunk/java/gadgets/README Fri Mar  7 05:40:29 2008
@@ -10,6 +10,8 @@
    * mvn package - Builds Gadget Server and runs tests.
    * mvn jetty:run - Builds Gadget Server (no tests), installs Servlet at localhost:8080.
      - To run on a different port, use: mvn -Djetty.port=<port> jetty:run
+   * mvn jetty:run-war - If you want to use the sample container or use any of
+     the sample files you need to run in this mode.
 
 4) Hit server at http://localhost:<port>/gadgets/ifr?url=<gadget-url>
    Example: http://localhost:<port>/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml

Modified: incubator/shindig/trunk/javascript/README
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/README?rev=634669&r1=634668&r2=634669&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/README (original)
+++ incubator/shindig/trunk/javascript/README Fri Mar  7 05:40:29 2008
@@ -2,17 +2,26 @@
 =========================================
 
 1) Try out the samples.
-   These provide examples of Gadget Container using gmodules.com for rendering.
-   Point your web browser at the following, substituting your Shindig code directory
-   for <shindig-dir>:
-   * file:///shindig-dir/javascript/container/sample1.html
-   * file:///shindig-dir/javascript/container/sample3.html
-
-   Samples #2 and #4 need to be run in the context of a webserver for cookie and
-   container-gadget communication support. Start up your favorite browser and point
-   it at the .../shindig/javascript/container directory (here abbreviated <shindig-js-dir>):
-   * http://yourserver:yourport/shindig-js-dir/sample2.html
-   * http://yourserver:yourport/shindig-js-dir/sample4.html
+   A) Set up your own Shindig Gadget Server. See its README for details.
+
+   B) Assuming your server is running on http://yourserver:yourport/gadgets/...
+      you can hit these html files in your favorite browser to see your local
+      Shindig in action:
+
+      (Note: yourserver:yourport defaults to localhost:8080 for the java server,
+      and just localhost for the php server)
+
+      * http://yourserver:yourport/gadgets/files/container/sample1.html - basic container
+      * http://yourserver:yourport/gadgets/files/container/sample2.html - custom rendering
+      * http://yourserver:yourport/gadgets/files/container/sample3.html - custom layouts
+      * http://yourserver:yourport/gadgets/files/container/sample4.html - set pref
+      * http://yourserver:yourport/gadgets/files/container/sample5.html - set pref
+      * http://yourserver:yourport/gadgets/files/container/sample6.html - dynamic height
+      * http://yourserver:yourport/gadgets/files/container/sample7.html - set title
+
+      These samples are very basic and aren't production-ready. Shindig will
+      include a more advanced container at a later date but it hasn't been
+      completed yet.
 
 2) Play around with the code.
 
@@ -23,48 +32,42 @@
 
    B) For each Gadget you wish to add to the page:
       i) Create it. Example, for Gadget whose spec is at http://foo.com/spec.xml
-      var gadget = gadgets.container.createGadget({ specUrl: "http://foo.com/spec.xml" });
+
+        var gadget = gadgets.container.createGadget(
+            {specUrl: "http://foo.com/spec.xml"});
 
       ii) Add it to the container. Example:
-      gadgets.container.addGadget(gadget);
 
-      iii) Ensure the Gadget's chrome ID is defined. This is the ID of the elements
-           in which the Gadget is rendered. The way these are specified differs
-           depending on the LayoutManager being used. Example with default LayoutManager:
-      gadgets.container.layoutManager.setGadgetChromeIds([ 'gadget-id-1' ]);
+        gadgets.container.addGadget(gadget);
 
-      iv) Render it. The chrome element must exist when this call is performed (ie.
-          this must occur onLoad of the document.body or in inline script).
-      gadgets.container.renderGadget(gadget);
+      iii) Ensure the Gadget's chrome ID is defined. This is the ID of the
+        elements in which the Gadget is rendered. The way these are specified
+        differs depending on the LayoutManager being used. Example with default
+        LayoutManager:
 
-          You may also render several added Gadgets at once:
-      gadgets.container.renderGadgets();
+        gadgets.container.layoutManager.setGadgetChromeIds([ 'gadget-id-1' ]);
 
-   C) Explore samples 2, 3, and 4 for examples using different LayoutManagers and
-      supporting UserPrefs storage.
+      iv) Render it. The chrome element must exist when this call is performed
+        (ie. this must occur onLoad of the document.body or in inline script).
 
-3) Try it with your own Gadget Server.
-   A) Set up your own Shindig Gadget Server. See its README for details.
+        gadgets.container.renderGadget(gadget);
 
-   B) Assume your server is running on http://yourserver:yourport/gadgets/...
-      Before step 2.B.iv, call the following to point the Gadget at your server:
-      gadget.setServerBase('http://yourserver:yourport/gadgets/');
+        You may also render several added Gadgets at once:
 
-4) Run the opensocial sample container
-   A) Set up your own Shindig Gadget Server. See its README for details.
+        gadgets.container.renderGadgets();
 
-   B) Start shindig using
-      mvn jetty:run-war
+   C) Explore samples 2, 3, and 4 for examples using different LayoutManagers
+      and supporting UserPrefs storage.
 
-    C) Hit the sample container at
-    http://yourserver:yourport/gadgets/files/samplecontainer/samplecontainer.html
+4) Run the opensocial sample container
+   A) Set up your own Shindig Gadget Server. See its README for details. (If you
+     are using the java based server make sure you run with mvn jetty:run-war)
 
-    D) See the sample container help document for more details on how it works:
-    http://yourserver:yourport/gadgets/files/samplecontainer/getting-started.html
+   B) Hit the sample container at
+     http://yourserver:yourport/gadgets/files/samplecontainer/samplecontainer.html
 
+   C) See the sample container help document for more details on how it works:
+     http://yourserver:yourport/gadgets/files/samplecontainer/getting-started.html
 
-NOTE: In the short term, when rendering Gadgets using gmodules.com certain
-      functionality tied to inter-frame communication will not work,
-      such as SetPrefs and dynamically setting IFRAME height.
 
 For more information, see http://incubator.apache.org/projects/shindig.html