Author: etnu
Date: Tue Apr 15 00:56:22 2008
New Revision: 648157

URL: http://svn.apache.org/viewvc?rev=648157&view=rev
Log:
Applied SHINDIG-195, contributed by Alejandro Rivero


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=648157&r1=648156&r2=648157&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/README (original)
+++ incubator/shindig/trunk/java/gadgets/README Tue Apr 15 00:56:22 2008
@@ -7,13 +7,32 @@
    JDK/JRE, and that the maven executable is in your PATH.
 
 3) From java/gadgets/...
-   * mvn package - Builds Gadget Server and runs tests.
+   * mvn package - Builds Gadget Server and runs tests. Useful also when you 
need first to obtain and
+     export sources-jar, e.g. for remote debugging with Eclipse.
    * 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.
+     the sample files you need to run in this mode. Also, mvn 
jetty:run-exploded can work. 
 
 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
+
+
+Running your own data in the OpenSocial Servlet
+===============================================
+
+1) By default the opensocial samplecontainer is run, reading initial data from 
the sample files.
+
+2) Get some debugging. As a minumum, Eclipse with the usual instructions for 
external debugging with
+   maven will do. Get also some way to type javascript inside a gadget. For 
instance you
+   can try the gadget coderunner.xml from 
http://opensocial-resources.googlecode.com/
+
+3) Learn how to inject separate services por People, Activities and Data. The 
injection is done
+   via Guice. Check the file DefaultGuiceModule.java in the src/ hierarchy. 
Check the code 
+   in the social/samplecontainer/ and social/opensocial/. Try to write a 
BasicPeopleService
+   or a BasicActivitiesService.
+
+4) Inject your services by importing them into the GuiceModule.   
+
 
 For more information, see http://incubator.apache.org/projects/shindig.html

Modified: incubator/shindig/trunk/javascript/README
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/README?rev=648157&r1=648156&r2=648157&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/README (original)
+++ incubator/shindig/trunk/javascript/README Tue Apr 15 00:56:22 2008
@@ -38,10 +38,19 @@
         var gadget = gadgets.container.createGadget(
             {specUrl: "http://foo.com/spec.xml"});
 
+        Check "gadgets.js" for other options to be set in createGadget. If you 
are
+       debugging your own gadgets you can consider to use specVersion to get a 
more
+       optimal use of the cache. Alternatively, 
gadgets.container.setNoCache(1) 
+
       ii) Add it to the container. Example:
 
         gadgets.container.addGadget(gadget);
 
+         If your setup is too complicated, you can need to tell each Gadget
+       where its server is. Example
+
+       gadget.setServerBase("http://yourserver:yourport/gadgets/";);
+
       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
@@ -70,6 +79,9 @@
 
    C) See the sample container help document for more details on how it works:
      
http://yourserver:yourport/gadgets/files/samplecontainer/getting-started.html
+
+   D) Get, and try to run, coderunner.xml and compliancetest.xml from the 
project
+     http://opensocial-resources.googlecode.com/
 
 
 For more information, see http://incubator.apache.org/projects/shindig.html


Reply via email to