You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ronald Tetsuo Miura (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/03/27 14:38:27 UTC

[jira] [Issue Comment Edited] (WICKET-4471) Generic registry of javascript/css resource references

    [ https://issues.apache.org/jira/browse/WICKET-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239397#comment-13239397 ] 

Ronald Tetsuo Miura edited comment on WICKET-4471 at 3/27/12 12:36 PM:
-----------------------------------------------------------------------

What that bundle thing does is to fetch all the resources and merge them automatically?

By reading the code, it seemed to me that you create the merged file yourself (statically), pass a reference to it to the bundle constructor, than add provided resources, to be marked as if they were already added to the header. Isn't it so?

If that is the case, there is no fallback or killing CDN's benefits, just a way to say that a number of resource dependencies are already provided by a single resource. Then, what's the problem that that single merged resource is served by an external CDN? Or by a separate Apache HTTP server, hosted in a separate subdomain? There should no need to force the Java application to serve these static files directly!
                
      was (Author: ronaldtm):
    What that bundle thing does is to fetch all the resources and merge them automatically?

By reading the code, it seemed to me that you create the merged file yourself (statically), pass a reference to it to the bundle constructor, than add provided resources, to be marked as if they were already added to the header. Isn't it so?

If that is the case, there is no fallback or killing CDN's benefits, just a way to say that a number of resource dependencies are already provided by a single resource. If that is the case, what's the problem that that single merged resource is served by an external CDN? Or by a separate Apache HTTP server, hosted in a separate subdomain? There should no need to force the Java application to serve these static files directly!
                  
> Generic registry of javascript/css resource references
> ------------------------------------------------------
>
>                 Key: WICKET-4471
>                 URL: https://issues.apache.org/jira/browse/WICKET-4471
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0-beta1
>            Reporter: Ronald Tetsuo Miura
>            Assignee: Emond Papegaaij
>            Priority: Minor
>         Attachments: 0001-WICKET-4471-unwrap-ResourceBundleReference-to-render.patch
>
>
> It would be nice if JavaScriptLibrarySettings had a generic mechanism to register javascript/css resource references (maybe using something like MetaDataKeys).
> This way, extension/third-party components (ModalWindow, DateTimeField, etc.) could register their resources, or just lookup for substitute resource references for their own scripts/stylesheets.
> This would allow some optimizations, such as minification/compression and joining many files into one, and hosting static files in CDNs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira