You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/06/05 14:20:02 UTC

[jira] [Commented] (WICKET-5610) Adopt IApplicationSettings.useCdnResources() from wicket-bootstrap

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

Martin Grigorov commented on WICKET-5610:
-----------------------------------------

I am not sure that I like this.
It is quite easy to setup your own jquery resource reference.
Some people will use Google CDNs, other Akamai's, other JQuery's own one, other a private one...
Even upgrading JQuery to 1.9+ caused a lot of noise in the forums.

-1 from me.

> Adopt IApplicationSettings.useCdnResources() from wicket-bootstrap
> ------------------------------------------------------------------
>
>                 Key: WICKET-5610
>                 URL: https://issues.apache.org/jira/browse/WICKET-5610
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.15.0
>            Reporter: Hendy Irawan
>
> wicket-bootstrap has a [IBootstrapSettings.useCdnResources()|https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/bootstrap-parent-0.9.3/bootstrap-core/src/main/java/de/agilecoders/wicket/core/settings/IBootstrapSettings.java] which is a great idea.
> Wicket should adopt this setting in core. And when true, Wicket JS libraries such as jQuery should use public CDN.
> This setting will default to true on {{DEPLOYMENT}}, and false for {{DEVELOPMENT}} (but of course, can be set to true programmatically).
> wicket-bootstrap will then can use CDN settings from wicket core.
> In addition, I would suggest a variant of {{JavaScriptResourceReference}} that also has an additional parameter for {{cdnUrl}} (which can be {{String}} for convenience or {{Url}} for strictness, up to you), e.g. :
> {code}
> 	public HowlerJavaScriptReference() {
> 		super(HowlerJavaScriptReference.class, "howler.js", "//cdnjs.cloudflare.com/ajax/libs/howler/1.1.17/howler.min.js");
> 	}
> {code}
> its behavior will switch based on {{useCdnResources}} setting, and very easy and practical to code this way. :)



--
This message was sent by Atlassian JIRA
(v6.2#6252)