You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Viral Patel <vi...@gmail.com> on 2009/04/20 20:02:49 UTC

Custom Container in Java

Greetings to everyone,
I am working in direction of implementing open social container for my java
application using Shindig. I have a small social web application that I
created in Java, I need to add open social support in this application.

I have installed Apache Shinding in my computer and am able to compile and
run it using maven. While reading documentation of Shindig I came to know
that I have to implement number of interfaces/classes to customize it and
integrate it with my social web application. I went through Chris's tutorial
(
http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/shindig_data_tutorials.html#tutorial4)
but still not able to understand the flow. And I think that this tutorial
was created for some previous version of Shindig.

Can anyone please help me in my implementation. Which classes to implement
and some basic steps to implement Java version of Shindig.

Thanks in advance,
Viral Patel

RE: Custom Container in Java

Posted by "Fisher, Tim" <Ti...@compuware.com>.
I second Mark's call for a "user's guide" to Shindig.  Current
information and documentation is scattered and sparse leaving everyone
to go through the same pain of figuring it out from scratch.  Frankly, I
would put that at a higher importance at this point than even adding
additional code features.  It will really help out the adoption.

Tim 


The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

From: Mark D Weitzel [mailto:weitzelm@us.ibm.com] 
Sent: Tuesday, April 21, 2009 3:29 PM
To: shindig-dev@incubator.apache.org
Cc: shindig-dev@incubator.apache.org
Subject: RE: Custom Container in Java

I agree with Jordan. I think this is made a bit worse by having lots of
similar bits of information in different places as well. Right now, the
shindig wiki probably only contributes to this problem rather than
provides an clarity. Maybe one thing we could do is start a "user's
guide" 
and/or "developer's guide" on the wiki and work with the community to
build out what we need.

http://cwiki.apache.org/confluence/display/SHINDIG/Index

-Mark W.



From:
"Jordan Zimmerman" <jo...@shop.com>
To:
<sh...@incubator.apache.org>
Date:
04/21/2009 02:49 PM
Subject:
RE: Custom Container in Java



>What I am looking is a simple tutorial or document that can guide me 
>through procedure of implementing custom component.
It doesn't exist. You're going to have to slog through like the rest of
us did. Search through my old postings to see that I truly empathize
with what you are about to go through.

Jordan Zimmerman
Principal Software Architect
831.647.4712
831.214.2990 (cell)
jordanz@shop.com 

SHOP*COMTM
Shop Smart, Save Big(tm)
www.shop.com

This message (including any attachments) is intended only for the use of
the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential,
and exempt from disclosure under applicable law or may constitute as
attorney work product.
If you are not the intended recipient, you are hereby notified that any
use, dissemination, distribution, or copying of this communication is
strictly prohibited. If you have received this communication in error,
notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.

Thank you.

RE: Custom Container in Java

Posted by Mark D Weitzel <we...@us.ibm.com>.
I agree with Jordan. I think this is made a bit worse by having lots of 
similar bits of information in different places as well. Right now, the 
shindig wiki probably only contributes to this problem rather than 
provides an clarity. Maybe one thing we could do is start a "user's guide" 
and/or "developer's guide" on the wiki and work with the community to 
build out what we need.

http://cwiki.apache.org/confluence/display/SHINDIG/Index

-Mark W.



From:
"Jordan Zimmerman" <jo...@shop.com>
To:
<sh...@incubator.apache.org>
Date:
04/21/2009 02:49 PM
Subject:
RE: Custom Container in Java



>What I am looking is a simple tutorial or document that
>can guide me through procedure of implementing custom component.
It doesn't exist. You're going to have to slog through like the rest of
us did. Search through my old postings to see that I truly empathize
with what you are about to go through.

Jordan Zimmerman
Principal Software Architect
831.647.4712
831.214.2990 (cell)
jordanz@shop.com 

SHOP*COMTM
Shop Smart, Save Big(tm)
www.shop.com

This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this 
message
immediately if this is an electronic communication.

Thank you.



RE: Custom Container in Java

Posted by Jordan Zimmerman <jo...@shop.com>.
>What I am looking is a simple tutorial or document that
>can guide me through procedure of implementing custom component.
It doesn't exist. You're going to have to slog through like the rest of
us did. Search through my old postings to see that I truly empathize
with what you are about to go through.

Jordan Zimmerman
Principal Software Architect
831.647.4712
831.214.2990 (cell)
jordanz@shop.com 

SHOP*COMTM
Shop Smart, Save Big(tm)
www.shop.com

This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this 
message
immediately if this is an electronic communication.

Thank you.

Re: Custom Container in Java

Posted by Viral Patel <vi...@gmail.com>.
Thanks for the reply,
Actually I am still confused. I have started looking in source code for
modification of SPI. What I am looking is a simple tutorial or document that
can guide me through procedure of implementing custom component.

My web application has few database tables to store User information,
Relationship information and Messages information. I want to implement
opensocial so that to add support for applications.

Now can anyone please guide me few simple steps to go forward from here. I
would really appreciate any help in this regards.

Thanks,
Viral


On Tue, Apr 21, 2009 at 2:32 AM, Kevin Brown <et...@google.com> wrote:

> On Mon, Apr 20, 2009 at 1:42 PM, Fisher, Tim <Tim.Fisher@compuware.com
> >wrote:
>
> > Can you explain a bit more of the details behind this statement:
> > "Depending on what you want to support for gadget rendering, you may
> > need to provide custom implementations of the OAuthRequest and
> > HttpFetcher classes."
> >
> > What scenarios would cause you to want to implement your own
> > OAuthRequest and HttpFetcher classes?
>
>
> You'd want to do a custom OAuthRequest if you need to support large-scale
> "full" oauth. Read the documentation on that class for details.
>
> A custom HttpFetcher is not as essential anymore now that we're based on
> the
> commons HttpClient, but if you're running the server inside your firewall
> you need to make sure that you prevent it from being able to fetch internal
> resources. Otherwise a malicious gadget could easily grab data from behind
> your firewall and serve it externally.
>
>
> >
> >
> > Thanks,
> > Timothy Fisher
> > Compuware Covisint
> >
> >
> >
> > The contents of this e-mail are intended for the named addressee only. It
> > contains information that may be confidential. Unless you are the named
> > addressee or an authorized designee, you may not copy or use it, or
> disclose
> > it to anyone else. If you received it in error please notify us
> immediately
> > and then destroy it.
> >
> > From: Kevin Brown [mailto:etnu@google.com]
> > Sent: Monday, April 20, 2009 4:34 PM
> > To: shindig-dev@incubator.apache.org
> > Subject: Re: Custom Container in Java
> >
> > For the most part you just need to implement the interfaces here:
> >
> > http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src
> > /main/java/org/apache/shindig/social/opensocial/spi/<
> http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src%0A/main/java/org/apache/shindig/social/opensocial/spi/
> >
> >
> > Depending on what you want to support for gadget rendering, you may need
> > to provide custom implementations of the OAuthRequest and HttpFetcher
> > classes.
> > The rest should be suitable out of the box.
> >
> > On Mon, Apr 20, 2009 at 11:02 AM, Viral Patel
> > <vi...@gmail.com>wrote:
> >
> > > Greetings to everyone,
> > > I am working in direction of implementing open social container for my
> >
> > > java application using Shindig. I have a small social web application
> > > that I created in Java, I need to add open social support in this
> > application.
> > >
> > > I have installed Apache Shinding in my computer and am able to compile
> >
> > > and run it using maven. While reading documentation of Shindig I came
> > > to know that I have to implement number of interfaces/classes to
> > > customize it and integrate it with my social web application. I went
> > > through Chris's tutorial (
> > >
> > > http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/shindig_data_
> > > tutorials.html#tutorial4
> > > )
> > > but still not able to understand the flow. And I think that this
> > > tutorial was created for some previous version of Shindig.
> > >
> > > Can anyone please help me in my implementation. Which classes to
> > > implement and some basic steps to implement Java version of Shindig.
> > >
> > > Thanks in advance,
> > > Viral Patel
> > >
> >
>

Re: Custom Container in Java

Posted by Kevin Brown <et...@google.com>.
On Mon, Apr 20, 2009 at 1:42 PM, Fisher, Tim <Ti...@compuware.com>wrote:

> Can you explain a bit more of the details behind this statement:
> "Depending on what you want to support for gadget rendering, you may
> need to provide custom implementations of the OAuthRequest and
> HttpFetcher classes."
>
> What scenarios would cause you to want to implement your own
> OAuthRequest and HttpFetcher classes?


You'd want to do a custom OAuthRequest if you need to support large-scale
"full" oauth. Read the documentation on that class for details.

A custom HttpFetcher is not as essential anymore now that we're based on the
commons HttpClient, but if you're running the server inside your firewall
you need to make sure that you prevent it from being able to fetch internal
resources. Otherwise a malicious gadget could easily grab data from behind
your firewall and serve it externally.


>
>
> Thanks,
> Timothy Fisher
> Compuware Covisint
>
>
>
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or disclose
> it to anyone else. If you received it in error please notify us immediately
> and then destroy it.
>
> From: Kevin Brown [mailto:etnu@google.com]
> Sent: Monday, April 20, 2009 4:34 PM
> To: shindig-dev@incubator.apache.org
> Subject: Re: Custom Container in Java
>
> For the most part you just need to implement the interfaces here:
>
> http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src
> /main/java/org/apache/shindig/social/opensocial/spi/<http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src%0A/main/java/org/apache/shindig/social/opensocial/spi/>
>
> Depending on what you want to support for gadget rendering, you may need
> to provide custom implementations of the OAuthRequest and HttpFetcher
> classes.
> The rest should be suitable out of the box.
>
> On Mon, Apr 20, 2009 at 11:02 AM, Viral Patel
> <vi...@gmail.com>wrote:
>
> > Greetings to everyone,
> > I am working in direction of implementing open social container for my
>
> > java application using Shindig. I have a small social web application
> > that I created in Java, I need to add open social support in this
> application.
> >
> > I have installed Apache Shinding in my computer and am able to compile
>
> > and run it using maven. While reading documentation of Shindig I came
> > to know that I have to implement number of interfaces/classes to
> > customize it and integrate it with my social web application. I went
> > through Chris's tutorial (
> >
> > http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/shindig_data_
> > tutorials.html#tutorial4
> > )
> > but still not able to understand the flow. And I think that this
> > tutorial was created for some previous version of Shindig.
> >
> > Can anyone please help me in my implementation. Which classes to
> > implement and some basic steps to implement Java version of Shindig.
> >
> > Thanks in advance,
> > Viral Patel
> >
>

RE: Custom Container in Java

Posted by Jordan Zimmerman <jo...@shop.com>.
>What scenarios would cause you to want to implement your own
>OAuthRequest and HttpFetcher classes?

Welcome to the world of Shindig. Shindig is excellent, but understanding
it is not easy.

OAuth is necessary if you plan on supporting gadgets.io.makeRequest().
HttpFetcher _may_ be necessary as there is an off-handed comment in
Shindig's default implementation that says "Not recommended for
production deployments until the following issues are addressed:...".
However, I'm using the built-in BasicHttpFetcher and it seems to work
fine for me. 

Jordan Zimmerman
Principal Software Architect
831.647.4712
831.214.2990 (cell)
jordanz@shop.com 

SHOP*COMTM
Shop Smart, Save Big(tm)
www.shop.com

This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this 
message
immediately if this is an electronic communication.

Thank you.

RE: Custom Container in Java

Posted by "Fisher, Tim" <Ti...@compuware.com>.
Can you explain a bit more of the details behind this statement:
"Depending on what you want to support for gadget rendering, you may
need to provide custom implementations of the OAuthRequest and
HttpFetcher classes."

What scenarios would cause you to want to implement your own
OAuthRequest and HttpFetcher classes?

Thanks,
Timothy Fisher
Compuware Covisint



The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

From: Kevin Brown [mailto:etnu@google.com] 
Sent: Monday, April 20, 2009 4:34 PM
To: shindig-dev@incubator.apache.org
Subject: Re: Custom Container in Java

For the most part you just need to implement the interfaces here:

http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src
/main/java/org/apache/shindig/social/opensocial/spi/

Depending on what you want to support for gadget rendering, you may need
to provide custom implementations of the OAuthRequest and HttpFetcher
classes.
The rest should be suitable out of the box.

On Mon, Apr 20, 2009 at 11:02 AM, Viral Patel
<vi...@gmail.com>wrote:

> Greetings to everyone,
> I am working in direction of implementing open social container for my

> java application using Shindig. I have a small social web application 
> that I created in Java, I need to add open social support in this
application.
>
> I have installed Apache Shinding in my computer and am able to compile

> and run it using maven. While reading documentation of Shindig I came 
> to know that I have to implement number of interfaces/classes to 
> customize it and integrate it with my social web application. I went 
> through Chris's tutorial (
>
> http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/shindig_data_
> tutorials.html#tutorial4
> )
> but still not able to understand the flow. And I think that this 
> tutorial was created for some previous version of Shindig.
>
> Can anyone please help me in my implementation. Which classes to 
> implement and some basic steps to implement Java version of Shindig.
>
> Thanks in advance,
> Viral Patel
>

Re: Custom Container in Java

Posted by Kevin Brown <et...@google.com>.
For the most part you just need to implement the interfaces here:

http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/

Depending on what you want to support for gadget rendering, you may need to
provide custom implementations of the OAuthRequest and HttpFetcher classes.
The rest should be suitable out of the box.

On Mon, Apr 20, 2009 at 11:02 AM, Viral Patel <vi...@gmail.com>wrote:

> Greetings to everyone,
> I am working in direction of implementing open social container for my java
> application using Shindig. I have a small social web application that I
> created in Java, I need to add open social support in this application.
>
> I have installed Apache Shinding in my computer and am able to compile and
> run it using maven. While reading documentation of Shindig I came to know
> that I have to implement number of interfaces/classes to customize it and
> integrate it with my social web application. I went through Chris's
> tutorial
> (
>
> http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/shindig_data_tutorials.html#tutorial4
> )
> but still not able to understand the flow. And I think that this tutorial
> was created for some previous version of Shindig.
>
> Can anyone please help me in my implementation. Which classes to implement
> and some basic steps to implement Java version of Shindig.
>
> Thanks in advance,
> Viral Patel
>

RE: Custom Container in Java

Posted by Jordan Zimmerman <jo...@shop.com>.
>I have installed Apache Shinding in my computer and am able to compile 
>and run it using maven.
Welcome and good luck :) 

I was in your same position. You can see how I did it and, if you like,
use my framework: http://code.google.com/p/mediated-opensocial/

Jordan Zimmerman
Principal Software Architect
831.647.4712
831.214.2990 (cell)
jordanz@shop.com 

SHOP*COMTM
Shop Smart, Save Big(tm)
www.shop.com

This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this 
message
immediately if this is an electronic communication.

Thank you.