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

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

     [ https://issues.apache.org/jira/browse/WICKET-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hendy Irawan updated WICKET-5610:
---------------------------------

    Description: 
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. :)

  was:
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.


> 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)