wicket 8 / javascript

2017-08-25 Thread Korbinian Bachl
Hi,

after deploying our app with wicket 8, I've seen that the javacript files of 
AJAX are not really optimised.

Issues are:

- 2 Files - instead of putting out 1 file of JS for wicket, we get 2 (3 if we 
count jQuery); I dont see this as good especially since 1 of those files is 
quite small...

- JS Code is not compressed/ optimized for production; so far only comments are 
stripped out but no real optimization in terms of newline (nearly 3k!) and 
whitespaces are done

Beside this, it is also noticable that the jQuery JS file gets stripped of its 
copyright notice, see:

http://examples8x.wicket.apache.org/ajax/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-ver-F9EE266EF993962AD59E804AD9DEBE66.js


Best,

KB

PS: we're on wicket 8 M7;


Re: wicket 8 / javascript

2017-08-25 Thread Martin Grigorov
Hi,


On Fri, Aug 25, 2017 at 10:37 AM, Korbinian Bachl <
korbinian.ba...@whiskyworld.de> wrote:

> Hi,
>
> after deploying our app with wicket 8, I've seen that the javacript files
> of AJAX are not really optimised.
>
> Issues are:
>
> - 2 Files - instead of putting out 1 file of JS for wicket, we get 2 (3 if
> we count jQuery); I dont see this as good especially since 1 of those files
> is quite small...
>

Agreed!


>
> - JS Code is not compressed/ optimized for production; so far only
> comments are stripped out but no real optimization in terms of newline
> (nearly 3k!) and whitespaces are done
>

Not true!
At
https://github.com/apache/wicket/tree/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js
there are only non-compressed but in the produced wicket-core.jar there are
.min.js next to them.


>
> Beside this, it is also noticable that the jQuery JS file gets stripped of
> its copyright notice, see:
>

This must be
https://github.com/apache/wicket/blob/411aa0ee38d45232f075549bf7212e78a0c626ce/wicket-core/src/main/java/org/apache/wicket/javascript/DefaultJavaScriptCompressor.java
You can disable it with getResourceSettings().setJavaScriptCompressor(null)


>
> http://examples8x.wicket.apache.org/ajax/wicket/
> resource/org.apache.wicket.resource.JQueryResourceReference/
> jquery/jquery-2.2.4-ver-F9EE266EF993962AD59E804AD9DEBE66.js
>
>
> Best,
>
> KB
>
> PS: we're on wicket 8 M7;
>


Re: wicket 8 / javascript

2017-08-25 Thread Korbinian Bachl
Hi,

> 
>>
>> - JS Code is not compressed/ optimized for production; so far only
>> comments are stripped out but no real optimization in terms of newline
>> (nearly 3k!) and whitespaces are done
>>
> 
> Not true!
> At
> https://github.com/apache/wicket/tree/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js
> there are only non-compressed but in the produced wicket-core.jar there are
> .min.js next to them.
> 
> 

Thats irritating, on our deployed live app with wicket 8.0.0-M7 (in production 
mode) these are not compressed?


>>

>> Beside this, it is also noticable that the jQuery JS file gets stripped of
>> its copyright notice, see:
>>
> 
> This must be
> https://github.com/apache/wicket/blob/411aa0ee38d45232f075549bf7212e78a0c626ce/wicket-core/src/main/java/org/apache/wicket/javascript/DefaultJavaScriptCompressor.java
> You can disable it with getResourceSettings().setJavaScriptCompressor(null)
> 

I'm not sure this is legally enough... I mean by default wicket strips legal 
notices I know this is annoying;