You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by trsvax <tr...@gmail.com> on 2012/04/27 21:51:37 UTC

General CDN problem that came up with Tree component

I have a CDN module that automatically copies assets to a CDN (specifically
Amazon S3/Cloudfront). I was working with the tree component and discovered
the bits that make of the tree interface were missing images. Things like
tree-branch.png, tree-sprits.png etc. When I looked I found out they are
background images included in the css like

  background-image: url(tree-branch.png);

While that's clever it means that the AssetPathConverter is never called for
tree-branch.png so the CDN does not work properly. While I can copy the up
manually and make things work it's not clear how to solve this problem in
the general case.

I suppose I could override the Asset service also and copy the files up from
there. 

I guess the question is in general if you want to move Assets to a CDN how
to you find them all?

--
View this message in context: http://tapestry.1045711.n5.nabble.com/General-CDN-problem-that-came-up-with-Tree-component-tp5671331p5671331.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: General CDN problem that came up with Tree component

Posted by Howard Lewis Ship <hl...@gmail.com>.
In the future, 5.4, we'll have CSS aggregation which will include
parsing the CSS files and rewriting url() elements ... and the value
will be passed through AssetPathConverter.

I also have some thoughts about having a web-service whose job is to
create an inventory of static and virtual assets that can be used to
drive the copying of files from the Tapestry app to a CDN.  Something
like "/assets/inventory" that returns a JSON document describing the
available assets.  The trick is finding them all, especially all the
ones buried on the classpath!

On Fri, Apr 27, 2012 at 4:32 PM, Chris Mylonas <ch...@opencsta.org> wrote:
>
> In a related question, do, or in the future will, ${expansions} work in css?
> I haven't tried.
>
>
>
> On 28/04/2012, at 5:51 AM, trsvax wrote:
>
>> I have a CDN module that automatically copies assets to a CDN (specifically
>> Amazon S3/Cloudfront). I was working with the tree component and discovered
>> the bits that make of the tree interface were missing images. Things like
>> tree-branch.png, tree-sprits.png etc. When I looked I found out they are
>> background images included in the css like
>>
>>  background-image: url(tree-branch.png);
>>
>> While that's clever it means that the AssetPathConverter is never called for
>> tree-branch.png so the CDN does not work properly. While I can copy the up
>> manually and make things work it's not clear how to solve this problem in
>> the general case.
>>
>> I suppose I could override the Asset service also and copy the files up from
>> there.
>>
>> I guess the question is in general if you want to move Assets to a CDN how
>> to you find them all?
>>
>> --
>> View this message in context: http://tapestry.1045711.n5.nabble.com/General-CDN-problem-that-came-up-with-Tree-component-tp5671331p5671331.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: General CDN problem that came up with Tree component

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 27 Apr 2012 20:32:26 -0300, Chris Mylonas <ch...@opencsta.org>  
wrote:

> In a related question, do, or in the future will, ${expansions} work in  
> css? I haven't tried.

Not yet, but it would be quite useful. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: General CDN problem that came up with Tree component

Posted by Chris Mylonas <ch...@opencsta.org>.
In a related question, do, or in the future will, ${expansions} work in css?
I haven't tried.



On 28/04/2012, at 5:51 AM, trsvax wrote:

> I have a CDN module that automatically copies assets to a CDN (specifically
> Amazon S3/Cloudfront). I was working with the tree component and discovered
> the bits that make of the tree interface were missing images. Things like
> tree-branch.png, tree-sprits.png etc. When I looked I found out they are
> background images included in the css like
> 
>  background-image: url(tree-branch.png);
> 
> While that's clever it means that the AssetPathConverter is never called for
> tree-branch.png so the CDN does not work properly. While I can copy the up
> manually and make things work it's not clear how to solve this problem in
> the general case.
> 
> I suppose I could override the Asset service also and copy the files up from
> there. 
> 
> I guess the question is in general if you want to move Assets to a CDN how
> to you find them all?
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/General-CDN-problem-that-came-up-with-Tree-component-tp5671331p5671331.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org