General CDN problem that came up with Tree component

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

General CDN problem that came up with Tree component

trsvax
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?
Reply | Threaded
Open this post in threaded view
|

Re: General CDN problem that came up with Tree component

chris@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: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: General CDN problem that came up with Tree component

Howard Lewis Ship
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 <[hidden email]> 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: General CDN problem that came up with Tree component

Thiago H de Paula Figueiredo
In reply to this post by chris@opencsta.org
On Fri, 27 Apr 2012 20:32:26 -0300, Chris Mylonas <[hidden email]>  
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: [hidden email]
For additional commands, e-mail: [hidden email]