You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by jo...@gmail.com on 2010/06/21 18:56:45 UTC

Support JS loader script in JsServlet; tweaks to JsUriManager et al. (issue1687043)

Reviewers: dev-remailer_shindig.apache.org,

Description:
Adds support for &jsload=1 argument to JsServlet, in which presence JS
is emitted which in turn loads (versioned) JavaScript from Shindig.

The benefits of doing so are:
1. Less JS on the wire, even for JS-triggered JS loads. The loader JS is
very small and cacheable for 1 hr; the subsequent JS should be versioned
and thus cacheable essentially indefinitely.
2. Sets up follow-up CL, which will support incremental JS loads using
this mechanism.

In supporting this, the JsUriManager API is slightly modified as well,
as follows:
1. make(...) method takes GadgetContext rather than Gadget.
2. JsUri extends ProxyUriBase to support the usual raft of params.

Please review this at http://codereview.appspot.com/1687043/show

Affected files:
    
java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriter.java
    
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/JsServlet.java
    
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/DefaultJsUriManager.java
    
java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/JsUriManager.java
    
java/gadgets/src/test/java/org/apache/shindig/gadgets/render/RenderingGadgetRewriterTest.java
    
java/gadgets/src/test/java/org/apache/shindig/gadgets/uri/DefaultJsUriManagerTest.java