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

Ronald Tetsuo Miura commented on WICKET-4471:
---------------------------------------------

This solves the dependencies between scripts, but we still have to download a 
number of different files.

I was thinking about the possibility of joining, for example, jquery.js, 
wicket-event.js, wicket-ajax.js, modal.js, calendar-min.js, wicket-date.js, and 
any other javascript file needed by components into a single, minified file, to 
optimize its download (and since you resolved issue WICKET-4466, we could 
easily host it in a CDN).

It's possible to do it with jquery.js, wicket-event.js, and wicket-ajax.js (by 
seting the same resource reference for all of them), but not with other 
javascript files scattered across the various built-in components (ModalWindow, 
DateTimeField), nor with third-party components.

I don't think it'd be feasible to do it transparently to third-party 
components, but if there was a generic mechanism built-in the framework, new 
libraries/versions of libraries could use it instead of creating their own 
custom mechanisms.

Not really a must-have feature, but nice for hard-core optimizations some 
people need.
                
> 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
>            Priority: Minor
>
> 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

        

Reply via email to