2008/3/18, Chris Chabot <[EMAIL PROTECTED]>:
>
>
> So an alternative is to do some .htaccess magic (pointing
> the /gadgets/social data request to a different directory/index.php then
> the other requests), but that wouldn't really be a self documenting
> solution and rely on people having some rudimentary mod_rewrite
> knowledge to customize anything, so while it has a lot less impact then
> the above it still adds an extra hurdle to the deployment other what i
> think the most basic PHP users would expect. (they would assume they can
> just upload some files to a folder, and it should 'work').
>
> So indeed the option i would be left with is to build the social data
> part into the gadget server, and have it just be another event handler
> in the same source tree and restructure the directory layout a bit to
> make it more clear what is what, ie:
>
> /php/gadgets/index.php  (entry point for everything)



in the same source tree?

Hmm, let me see the code. Actually, Cassie has implemented already two
handlers:

    handlers.add(new OpenSocialDataHandler());
    handlers.add(new StateFileDataHandler());

in theory, it could be possible to implement a PhpBridgeDataHandler()
reading the query to a xxx.xxx/index.php, very in the same way that
StateFileDataHandler reads an static xml thing.


> Well... thankfully the Java stuff is still easy to separate.

It seems also reasonable to separate the whole /gadgets/social json request
when it hits jetty. I understand this hit is described in
shindig/java/gadgets/src/main/webapp/WEB-INF/web.xml
 <servlet>
    <servlet-name>socialdata</servlet-name>
    <servlet-class>
      org.apache.shindig.social.GadgetDataServlet
    </servlet-class>
 </servlet>
 <servlet-mapping>
    <servlet-name>socialdata</servlet-name>
    <url-pattern>/socialdata</url-pattern>
 </servlet-mapping>

so you can just rename the urlpattern socialdata to socialdatajava and
redirect the rest to a php service; I do not know yet how it works in
maven-jetty but it should be some tag in this file; it is only that it is
not compiling just now, because I am using java 1.4.5 and Cassie has
migrated already to use jdk6. (Has it been announced somewhere???)

Alejandro

Reply via email to