You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Cassie <do...@apache.org> on 2008/03/06 17:21:25 UTC

Fixing our javascript/README file

Hey guys -

I was trying to fix the readme file and came up with something like the
below text, does this look right to all of you?

- Cassie


+++ javascript/README   (working copy)
@@ -2,18 +2,23 @@
 =========================================

 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
+   A) Set up your own Shindig Gadget Server. See its README for details.

-   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
+   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:

+   * 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.

    A) Create an HTML file including the following <head> boilerplate:
@@ -43,13 +48,6 @@
    C) Explore samples 2, 3, and 4 for examples using different
LayoutManagers and
       supporting UserPrefs storage.

-3) Try it with your own Gadget Server.
-   A) Set up your own Shindig Gadget Server. See its README for details.
-
-   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/');
-
 4) Run the opensocial sample container
    A) Set up your own Shindig Gadget Server. See its README for details.

@@ -63,8 +61,4 @@
     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

Re: Fixing our javascript/README file

Posted by Cassie <do...@apache.org>.
The Basic Services are now being injected with guice.
It seems like you have some good ideas for the READMEs though, do you
want to make a patch?

- Cassie


On Mon, Apr 14, 2008 at 3:08 PM, Alejandro Rivero <al...@gmail.com> wrote:
> Speaking of READMEs, the java one should mention now the injection of
> Basic Services. Or are they being planned into a different Guice
> module? By the way, pretty trick, this guice/inject thing.
>
> Another think for the READMEs is some recipe for nocache during development.
>
> Alejandro
>

Re: Fixing our javascript/README file

Posted by Alejandro Rivero <al...@gmail.com>.
Speaking of READMEs, the java one should mention now the injection of
Basic Services. Or are they being planned into a different Guice
module? By the way, pretty trick, this guice/inject thing.

Another think for the READMEs is some recipe for nocache during development.

Alejandro

Re: Fixing our javascript/README file

Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Cassie,

Well the PHP server is running under whatever web server people copied
it too, could be on any host name, under any port, and any type of
webserver too (lighttp, apache, etc), so in that regard it is a
different situation from the java version, where shindig is the 'web
server' as well, and much more unpredictable by nature.

However for documentation reasons using http://localhost/ is a
reasonable assumption, and mention that people should replace localhost
with their hostname if applicable.

	-- Chris

On Fri, 2008-03-07 at 13:49 +0100, Cassie wrote:
> Just a quick question. - is the default php server just localhost? Because I
> can add a line in declaring the defaults for both server types. I feel like
> that should be good enough.
> 
> - Cassie
> 
> 
> On Thu, Mar 6, 2008 at 11:11 PM, Kevin Brown <et...@google.com> wrote:
> 
> > Fair enough.
> >
> > On Thu, Mar 6, 2008 at 2:07 PM, Chris Chabot <ch...@xs4all.nl> wrote:
> >
> > > hence the preference for http://<yourhost>:<yourport> :)
> > >
> > > On Mar 6, 2008, at 10:33 PM, Kevin Brown wrote:
> > >
> > > > That depends on apache configuration for the PHP version -- if you
> > > > don't
> > > > have root access to your machine it's not going to be able to run on
> > > > port
> > > > 80.
> > > >
> > > > On Thu, Mar 6, 2008 at 1:26 PM, Chris Chabot <ch...@xs4all.nl>
> > > > wrote:
> > > >
> > > >> See thats why i preferred the neutral host:port text instead, it
> > > >> works
> > > >> with the (default) java server but with the php version as well :)
> > > >>
> > > >> Once its in good enough shape, i'd even hope to get it included in
> > > >> the
> > > >> index.html etc, which all still assume the java server addr format
> > > >> too
> > > >>
> > > >>       -- Chris
> > > >>
> > > >> On Mar 6, 2008, at 9:03 PM, Kevin Brown wrote:
> > > >>
> > > >>> We should probably mention that if it's running on the same machine
> > > >>> as their
> > > >>> browser it'll be localhost:8080 by default (also 127.0.0.1, which is
> > > >>> useful
> > > >>> for verifying that rpc actually works across origins).
> > > >>>
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > ~Kevin
> > >
> > >
> >
> >
> > --
> > ~Kevin
> >


Re: Fixing our javascript/README file

Posted by Kevin Brown <et...@google.com>.
localhost has nothing to do with php, it's just it always maps to the
self-referencing ip address. host names are a separate issue. In apache (the
standard php web server), this issue can be more complicated because of the
heavy use of virtual hosts. For the majority of people, localhost is usually
fine; anyone that wasn't using localhost is going to be knowledgeable enough
to change it.

On Fri, Mar 7, 2008 at 4:49 AM, Cassie <do...@apache.org> wrote:

> Just a quick question. - is the default php server just localhost? Because
> I
> can add a line in declaring the defaults for both server types. I feel
> like
> that should be good enough.
>
> - Cassie
>
>
> On Thu, Mar 6, 2008 at 11:11 PM, Kevin Brown <et...@google.com> wrote:
>
> > Fair enough.
> >
> > On Thu, Mar 6, 2008 at 2:07 PM, Chris Chabot <ch...@xs4all.nl> wrote:
> >
> > > hence the preference for http://<yourhost>:<yourport> :)
> > >
> > > On Mar 6, 2008, at 10:33 PM, Kevin Brown wrote:
> > >
> > > > That depends on apache configuration for the PHP version -- if you
> > > > don't
> > > > have root access to your machine it's not going to be able to run on
> > > > port
> > > > 80.
> > > >
> > > > On Thu, Mar 6, 2008 at 1:26 PM, Chris Chabot <ch...@xs4all.nl>
> > > > wrote:
> > > >
> > > >> See thats why i preferred the neutral host:port text instead, it
> > > >> works
> > > >> with the (default) java server but with the php version as well :)
> > > >>
> > > >> Once its in good enough shape, i'd even hope to get it included in
> > > >> the
> > > >> index.html etc, which all still assume the java server addr format
> > > >> too
> > > >>
> > > >>       -- Chris
> > > >>
> > > >> On Mar 6, 2008, at 9:03 PM, Kevin Brown wrote:
> > > >>
> > > >>> We should probably mention that if it's running on the same
> machine
> > > >>> as their
> > > >>> browser it'll be localhost:8080 by default (also 127.0.0.1, which
> is
> > > >>> useful
> > > >>> for verifying that rpc actually works across origins).
> > > >>>
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > ~Kevin
> > >
> > >
> >
> >
> > --
> > ~Kevin
> >
>



-- 
~Kevin

Re: Fixing our javascript/README file

Posted by Cassie <do...@apache.org>.
Just a quick question. - is the default php server just localhost? Because I
can add a line in declaring the defaults for both server types. I feel like
that should be good enough.

- Cassie


On Thu, Mar 6, 2008 at 11:11 PM, Kevin Brown <et...@google.com> wrote:

> Fair enough.
>
> On Thu, Mar 6, 2008 at 2:07 PM, Chris Chabot <ch...@xs4all.nl> wrote:
>
> > hence the preference for http://<yourhost>:<yourport> :)
> >
> > On Mar 6, 2008, at 10:33 PM, Kevin Brown wrote:
> >
> > > That depends on apache configuration for the PHP version -- if you
> > > don't
> > > have root access to your machine it's not going to be able to run on
> > > port
> > > 80.
> > >
> > > On Thu, Mar 6, 2008 at 1:26 PM, Chris Chabot <ch...@xs4all.nl>
> > > wrote:
> > >
> > >> See thats why i preferred the neutral host:port text instead, it
> > >> works
> > >> with the (default) java server but with the php version as well :)
> > >>
> > >> Once its in good enough shape, i'd even hope to get it included in
> > >> the
> > >> index.html etc, which all still assume the java server addr format
> > >> too
> > >>
> > >>       -- Chris
> > >>
> > >> On Mar 6, 2008, at 9:03 PM, Kevin Brown wrote:
> > >>
> > >>> We should probably mention that if it's running on the same machine
> > >>> as their
> > >>> browser it'll be localhost:8080 by default (also 127.0.0.1, which is
> > >>> useful
> > >>> for verifying that rpc actually works across origins).
> > >>>
> > >>
> > >>
> > >
> > >
> > > --
> > > ~Kevin
> >
> >
>
>
> --
> ~Kevin
>

Re: Fixing our javascript/README file

Posted by Kevin Brown <et...@google.com>.
Fair enough.

On Thu, Mar 6, 2008 at 2:07 PM, Chris Chabot <ch...@xs4all.nl> wrote:

> hence the preference for http://<yourhost>:<yourport> :)
>
> On Mar 6, 2008, at 10:33 PM, Kevin Brown wrote:
>
> > That depends on apache configuration for the PHP version -- if you
> > don't
> > have root access to your machine it's not going to be able to run on
> > port
> > 80.
> >
> > On Thu, Mar 6, 2008 at 1:26 PM, Chris Chabot <ch...@xs4all.nl>
> > wrote:
> >
> >> See thats why i preferred the neutral host:port text instead, it
> >> works
> >> with the (default) java server but with the php version as well :)
> >>
> >> Once its in good enough shape, i'd even hope to get it included in
> >> the
> >> index.html etc, which all still assume the java server addr format
> >> too
> >>
> >>       -- Chris
> >>
> >> On Mar 6, 2008, at 9:03 PM, Kevin Brown wrote:
> >>
> >>> We should probably mention that if it's running on the same machine
> >>> as their
> >>> browser it'll be localhost:8080 by default (also 127.0.0.1, which is
> >>> useful
> >>> for verifying that rpc actually works across origins).
> >>>
> >>
> >>
> >
> >
> > --
> > ~Kevin
>
>


-- 
~Kevin

Re: Fixing our javascript/README file

Posted by Chris Chabot <ch...@xs4all.nl>.
hence the preference for http://<yourhost>:<yourport> :)

On Mar 6, 2008, at 10:33 PM, Kevin Brown wrote:

> That depends on apache configuration for the PHP version -- if you  
> don't
> have root access to your machine it's not going to be able to run on  
> port
> 80.
>
> On Thu, Mar 6, 2008 at 1:26 PM, Chris Chabot <ch...@xs4all.nl>  
> wrote:
>
>> See thats why i preferred the neutral host:port text instead, it  
>> works
>> with the (default) java server but with the php version as well :)
>>
>> Once its in good enough shape, i'd even hope to get it included in  
>> the
>> index.html etc, which all still assume the java server addr format  
>> too
>>
>>       -- Chris
>>
>> On Mar 6, 2008, at 9:03 PM, Kevin Brown wrote:
>>
>>> We should probably mention that if it's running on the same machine
>>> as their
>>> browser it'll be localhost:8080 by default (also 127.0.0.1, which is
>>> useful
>>> for verifying that rpc actually works across origins).
>>>
>>
>>
>
>
> -- 
> ~Kevin


Re: Fixing our javascript/README file

Posted by Kevin Brown <et...@google.com>.
That depends on apache configuration for the PHP version -- if you don't
have root access to your machine it's not going to be able to run on port
80.

On Thu, Mar 6, 2008 at 1:26 PM, Chris Chabot <ch...@xs4all.nl> wrote:

> See thats why i preferred the neutral host:port text instead, it works
> with the (default) java server but with the php version as well :)
>
> Once its in good enough shape, i'd even hope to get it included in the
> index.html etc, which all still assume the java server addr format too
>
>        -- Chris
>
> On Mar 6, 2008, at 9:03 PM, Kevin Brown wrote:
>
> > We should probably mention that if it's running on the same machine
> > as their
> > browser it'll be localhost:8080 by default (also 127.0.0.1, which is
> > useful
> > for verifying that rpc actually works across origins).
> >
>
>


-- 
~Kevin

Re: Fixing our javascript/README file

Posted by Chris Chabot <ch...@xs4all.nl>.
See thats why i preferred the neutral host:port text instead, it works  
with the (default) java server but with the php version as well :)

Once its in good enough shape, i'd even hope to get it included in the  
index.html etc, which all still assume the java server addr format too

	-- Chris

On Mar 6, 2008, at 9:03 PM, Kevin Brown wrote:

> We should probably mention that if it's running on the same machine  
> as their
> browser it'll be localhost:8080 by default (also 127.0.0.1, which is  
> useful
> for verifying that rpc actually works across origins).
>


Re: Fixing our javascript/README file

Posted by Kevin Brown <et...@google.com>.
We should probably mention that if it's running on the same machine as their
browser it'll be localhost:8080 by default (also 127.0.0.1, which is useful
for verifying that rpc actually works across origins).

On Thu, Mar 6, 2008 at 9:19 AM, Chris Chabot <ch...@xs4all.nl> wrote:

> Looks good to me from my PoV
>
> On Mar 6, 2008, at 5:21 PM, Cassie wrote:
>
> > Hey guys -
> >
> > I was trying to fix the readme file and came up with something like
> > the
> > below text, does this look right to all of you?
> >
> > - Cassie
> >
> >
> > +++ javascript/README   (working copy)
> > @@ -2,18 +2,23 @@
> > =========================================
> >
> > 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
> > +   A) Set up your own Shindig Gadget Server. See its README for
> > details.
> >
> > -   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
> > +   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:
> >
> > +   * 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.
> >
> >    A) Create an HTML file including the following <head> boilerplate:
> > @@ -43,13 +48,6 @@
> >    C) Explore samples 2, 3, and 4 for examples using different
> > LayoutManagers and
> >       supporting UserPrefs storage.
> >
> > -3) Try it with your own Gadget Server.
> > -   A) Set up your own Shindig Gadget Server. See its README for
> > details.
> > -
> > -   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/'<http://yourserver:yourport/gadgets/%27>
> );
> > -
> > 4) Run the opensocial sample container
> >    A) Set up your own Shindig Gadget Server. See its README for
> > details.
> >
> > @@ -63,8 +61,4 @@
> >     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
>
>


-- 
~Kevin

Re: Fixing our javascript/README file

Posted by Chris Chabot <ch...@xs4all.nl>.
Looks good to me from my PoV

On Mar 6, 2008, at 5:21 PM, Cassie wrote:

> Hey guys -
>
> I was trying to fix the readme file and came up with something like  
> the
> below text, does this look right to all of you?
>
> - Cassie
>
>
> +++ javascript/README   (working copy)
> @@ -2,18 +2,23 @@
> =========================================
>
> 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
> +   A) Set up your own Shindig Gadget Server. See its README for  
> details.
>
> -   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
> +   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:
>
> +   * 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.
>
>    A) Create an HTML file including the following <head> boilerplate:
> @@ -43,13 +48,6 @@
>    C) Explore samples 2, 3, and 4 for examples using different
> LayoutManagers and
>       supporting UserPrefs storage.
>
> -3) Try it with your own Gadget Server.
> -   A) Set up your own Shindig Gadget Server. See its README for  
> details.
> -
> -   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/');
> -
> 4) Run the opensocial sample container
>    A) Set up your own Shindig Gadget Server. See its README for  
> details.
>
> @@ -63,8 +61,4 @@
>     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