wicketstuff-merged-resources: 2.1 and 3.0 released!

February 5th, 2010 by  |  Published in Java, Wicket, wicketstuff-merged-resources  |  11 Comments

I’m happy to announce the releases of wicketstuff-merged-resources 2.1 and 3.0.

Changes from 2.0 to 2.1 (Wicket 1.3.x):

(Note: [WMR-12] and [WMR-14] already went into 2.2-SNAPSHOT)

Changes for 3.0 (Wicket 1.4.x):

Downloads:

Responses

  1. Daan says:

    September 9th, 2010 at 3:04 pm (#)

    Hi Stefan,

    Is it also possible to have a subset of the CSS for a page?

    Suppose I have the following

    Page1.java
    common.css
    Page1.css

    Page2.java
    common.css
    Page2.css

    Now the Page2.css and the Page1.css will be merged in all.css. Is it possible to merge all the css files for one page (or panel), but not having the css come up in other pages?

    So, effectively this will happen:
    Page1.java has one css in the section, merged from common.css and Page1.css
    Page2.java has one css in the section, merged from common.css and Page2.css

    Is that possible?

  2. Stefan Fußenegger says:

    September 9th, 2010 at 5:16 pm (#)

    No, that’s not possible. Instead, you should consider merging all three into one file or simply keep them separate.

    You could also take a look on your site’s access statistics to check which page is the most important entry page. Assuming it’s Page1, you could merge Page1.css and common.css and keep Page2.css separate. If a user accesses Page2 there’s a good chance that the merged common.css is already in cache.

    Unfortunately, I don’t know of a way to measure cache hit rates for resources (as you can see at http://stackoverflow.com/questions/3300891/how-to-measure-http-cache-hit-rates). Hence tuning is all about such assumptions.

    Hope this helps.

  3. Mikko says:

    February 11th, 2011 at 9:13 am (#)

    I am in the process of finding a nice way to publish CSS and image resources in a multimodule Wicket project. I stumbled upon wicketstuff-merged-resources and it looks very promising!

    There is one problem though. I have tried both the 3.0 release and the svn trunk but both fail to contribute the required headers when component inheritance is involved. To be more clear, I have component A that declares some CSS contributions and component B that extends A. If I include component B on a page, then the CSS contributions of component A are not added to the headers.

    For our project this is a no go issue. However, I might be able to work on solving the issue if we discover that we can’t live without wicketstuff-merged-resources.

    I found this thread about the same problem:
    http://mail-archives.apache.org/mod_mbox/wicket-users/201005.mbox/%3cAANLkTilgZuVfxLE_OvOSSpNuh-fuvi6gYde7USArFR42@mail.gmail.com%3e

    Stefan, what is your take on this issue?

  4. Mikko says:

    February 11th, 2011 at 9:42 am (#)

    Replying to myself…

    Only after I had submitted my response it occured to me to check the svn log. At r5343 there was an attempt at solving the inheritance issue but it was reverted at r5354 due to some problems. So apparently this is not an trivial issue.

  5. Stefan Fußenegger says:

    February 11th, 2011 at 11:46 am (#)

    Hi Mikko,

    the new home of wicketstuff-merged-resources is now at Github:

    http://github.com/molindo/wicketstuff-merged-resources

    Right now, I don’t have time to look into the issue. But if I remember correctly, there was an issue raised in Wicketstuff JIRA before it went offline (for good?). Please raise a new issue at Github:

    https://github.com/molindo/wicketstuff-merged-resources/issues

    It’s certainly a valid issue (which I actually thought was solved a while ago). Nevertheless, I’ll try to have a look at it next week.

    Cheers, Stefan

  6. Mikko says:

    February 15th, 2011 at 9:00 am (#)

    Thanks, Stefan. I’ll try to raise a new issue.

    And hey, good luck with the project!

  7. Andr says:

    March 6th, 2011 at 6:33 pm (#)

    Thanks Stefan for providing such a great tool. Is their any chance that wicketstuff-merged will support using CDNs or that you blog about how to do it?

    regards,
    andr

  8. Stefan Fußenegger says:

    March 7th, 2011 at 4:07 pm (#)

    Hi Andr,

    that’s actually something I’ve planned to do for a while now.

    What type of CDN are you most interested in? One that requires uploading content to it’s server or one that fetches content from the your application on demand? We actually implemented and used both approaches with Amazon CloudFront.

    I’ll try to publish the code some time soon, I promise :)

    Cheers, Stefan

  9. andr says:

    March 8th, 2011 at 9:52 am (#)

    Hi Stefan,

    thanks for your quick reply. I have used cloudfiles so far based on the first option. Frankly, I haven’t heard of the second option so far, but it sound interesting.

    Could you quickly point out your experiences with amazon or the reasons why you chose it, since from my point of view they seem just more expensive as a CDN provider. But they offer interesting services like Beanstalk though…

    thanks,
    andr

  10. Stefan Fußenegger says:

    March 16th, 2011 at 2:09 pm (#)

    Andr, just wrote a new post on the topic: http://techblog.molindo.at/2011/03/serving-wicket-resources-from-cdn.html

    Concerning Amazaon CloudFront, I can’t say more than that: it simply works for us, as we’re in their environment anyway. It wasn’t more than a click of a button to get started.

    Pricing doesn’t matter too much either, since we are in the lower 3-digit numbers ($) with our monthly traffic. I simply doubt that switching providers could be worth the effort. But actually, we never seriously considered other CDNs :)

    Nevertheless, if you know any particularly cheap and reliable services, please let me know.

    Cheers, Stefan

  11. andr says:

    March 28th, 2011 at 2:16 pm (#)

    Hi Stefan,

    I was out of office for some weeks. Thanks for writing this post – I am very eager to try it out ;-)

    Thanks again,
    andr

Leave a Response