Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Sven Meier
BTW I'd rather keep the current solution as it is and discuss releasing Wicket 
8 :)

Sven

Am 29. März 2018 07:49:02 MESZ schrieb Sven Meier :
>It's perfectly fine to use whatever tool gets the job done. People say
>how to do it instead, but no one has to follow the advice.
>
>IMHO it's something different for a framework to offer an API on top of
>a something that doesn't even work reliably:
>Wicket's browser detection is using regex-matching on identifiers
>generated by browsers to make it difficult to be detected :P.
>
>Regarding integrating of mentioned libraries:
>
>   LibraryXY.browser(clientInfo.getUserAgent()).supportsZ()
>
>I don't see a benefit of having that in Wicket or wicketstuff.
>Integrating modernizr might be more interesting, but I doubt many
>people need browser detection on the server.
>
>Have fun
>Sven
>
>
>
>Am 29. März 2018 04:34:00 MESZ schrieb Maxim Solodovnik
>:
>>"you would use feature detection" - unfortunately it doesn't work
>>Good real-life example is WebRtc: you can check it is supported,
>>then you need to know which browser your client is using  (Plan A,
>>Plan B, Universal, "Safari way")
>>
>>Another example wmode for , FF acts differently,
>>
>>so I really miss "which-browser" feature detection 
>>
>>On Thu, Mar 29, 2018 at 5:31 AM, Korbinian Bachl
>> wrote:
>>>
>>>
>>> - Ursprüngliche Mail -
> even in 2009 it was considered bad: https://www.sitepoint.com/why-
> browser-sniffing-stinks/
> and in case that is not enough, read what the guy that invented
>>modernizr
> has to say:
> http://farukat.es/journal/2011/02/499-lest-we-forget-or-
> how-i-learned-whats-so-bad-about-browser-sniffing/
>
>
 I do not trust anyone who says "don't do it this way" but doesn't
>>say how
 to do it!

 There are several of "if (isBrowserX()) {...} else {...}" in Wicket
>>JS code
 and they served well for the last decade.
 Since there are several other *Java* libraries for user agent
>>detection
 this means that someone still finds them useful despite what other
>>people
 claim.
>>>
>>> unreliable things wont get reliably by pointing into the past and
>>then telling that your fater did it the same way
>>>
>>> nowadays you would use feature detection, see:
>>>
>>>
>>https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection
>>>


> btw:
> https://github.com/HaraldWalker/user-agent-utils -> this is EOL,
>>guess
> why...
> https://github.com/pieroxy/java-user-agent-detection/releases ->
>>last
> release from september 2017...
>
>
 Sep 2017 is like yesterday
>>>
>>> (all only MAJOR releases!)
>>>
>>> 28. September 2017 - Firefox 56
>>> 14. November 2017 - Firefox 57 Quantum
>>> 23. Januar 2018 - Firefox 58
>>> 13. März 2018 - Firefox 59
>>>
>>> 2017-09-05 - Chrome 61.0.3163
>>> 2017-10-17 - Chrome 62.0.3202
>>> 2017-12-05 - Chrome 63.0.3239
>>> 2018-01-23 - Chrome 64.0.3282
>>> 2018-03-06 - Chrome 65.0.3325
>>>
>>> and this is just 2 desktop ones! I dont want to talk about the loads
>>of updates my android device got in that time (firefox mobile, chrome
>>and samsung internet!) - oh, and btw: they still lie about the user
>>agent all time dont get me wrong, but sep 17 is freaking old in
>>case you need to reliably detect the browser!
>>
>>
>>
>>-- 
>>WBR
>>Maxim aka solomax


Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Sven Meier
It's perfectly fine to use whatever tool gets the job done. People say how to 
do it instead, but no one has to follow the advice.

IMHO it's something different for a framework to offer an API on top of a 
something that doesn't even work reliably:
Wicket's browser detection is using regex-matching on identifiers generated by 
browsers to make it difficult to be detected :P.

Regarding integrating of mentioned libraries:

   LibraryXY.browser(clientInfo.getUserAgent()).supportsZ()

I don't see a benefit of having that in Wicket or wicketstuff.
Integrating modernizr might be more interesting, but I doubt many people need 
browser detection on the server.

Have fun
Sven



Am 29. März 2018 04:34:00 MESZ schrieb Maxim Solodovnik :
>"you would use feature detection" - unfortunately it doesn't work
>Good real-life example is WebRtc: you can check it is supported,
>then you need to know which browser your client is using  (Plan A,
>Plan B, Universal, "Safari way")
>
>Another example wmode for , FF acts differently,
>
>so I really miss "which-browser" feature detection 
>
>On Thu, Mar 29, 2018 at 5:31 AM, Korbinian Bachl
> wrote:
>>
>>
>> - Ursprüngliche Mail -
 even in 2009 it was considered bad: https://www.sitepoint.com/why-
 browser-sniffing-stinks/
 and in case that is not enough, read what the guy that invented
>modernizr
 has to say:
 http://farukat.es/journal/2011/02/499-lest-we-forget-or-
 how-i-learned-whats-so-bad-about-browser-sniffing/


>>> I do not trust anyone who says "don't do it this way" but doesn't
>say how
>>> to do it!
>>>
>>> There are several of "if (isBrowserX()) {...} else {...}" in Wicket
>JS code
>>> and they served well for the last decade.
>>> Since there are several other *Java* libraries for user agent
>detection
>>> this means that someone still finds them useful despite what other
>people
>>> claim.
>>
>> unreliable things wont get reliably by pointing into the past and
>then telling that your fater did it the same way
>>
>> nowadays you would use feature detection, see:
>>
>>
>https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection
>>
>>>
>>>
 btw:
 https://github.com/HaraldWalker/user-agent-utils -> this is EOL,
>guess
 why...
 https://github.com/pieroxy/java-user-agent-detection/releases ->
>last
 release from september 2017...


>>> Sep 2017 is like yesterday
>>
>> (all only MAJOR releases!)
>>
>> 28. September 2017 - Firefox 56
>> 14. November 2017 - Firefox 57 Quantum
>> 23. Januar 2018 - Firefox 58
>> 13. März 2018 - Firefox 59
>>
>> 2017-09-05 - Chrome 61.0.3163
>> 2017-10-17 - Chrome 62.0.3202
>> 2017-12-05 - Chrome 63.0.3239
>> 2018-01-23 - Chrome 64.0.3282
>> 2018-03-06 - Chrome 65.0.3325
>>
>> and this is just 2 desktop ones! I dont want to talk about the loads
>of updates my android device got in that time (firefox mobile, chrome
>and samsung internet!) - oh, and btw: they still lie about the user
>agent all time dont get me wrong, but sep 17 is freaking old in
>case you need to reliably detect the browser!
>
>
>
>-- 
>WBR
>Maxim aka solomax


Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Maxim Solodovnik
"you would use feature detection" - unfortunately it doesn't work
Good real-life example is WebRtc: you can check it is supported,
then you need to know which browser your client is using  (Plan A,
Plan B, Universal, "Safari way")

Another example wmode for , FF acts differently,

so I really miss "which-browser" feature detection 

On Thu, Mar 29, 2018 at 5:31 AM, Korbinian Bachl
 wrote:
>
>
> - Ursprüngliche Mail -
>>> even in 2009 it was considered bad: https://www.sitepoint.com/why-
>>> browser-sniffing-stinks/
>>> and in case that is not enough, read what the guy that invented modernizr
>>> has to say:
>>> http://farukat.es/journal/2011/02/499-lest-we-forget-or-
>>> how-i-learned-whats-so-bad-about-browser-sniffing/
>>>
>>>
>> I do not trust anyone who says "don't do it this way" but doesn't say how
>> to do it!
>>
>> There are several of "if (isBrowserX()) {...} else {...}" in Wicket JS code
>> and they served well for the last decade.
>> Since there are several other *Java* libraries for user agent detection
>> this means that someone still finds them useful despite what other people
>> claim.
>
> unreliable things wont get reliably by pointing into the past and then 
> telling that your fater did it the same way
>
> nowadays you would use feature detection, see:
>
> https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection
>
>>
>>
>>> btw:
>>> https://github.com/HaraldWalker/user-agent-utils -> this is EOL, guess
>>> why...
>>> https://github.com/pieroxy/java-user-agent-detection/releases -> last
>>> release from september 2017...
>>>
>>>
>> Sep 2017 is like yesterday
>
> (all only MAJOR releases!)
>
> 28. September 2017 - Firefox 56
> 14. November 2017 - Firefox 57 Quantum
> 23. Januar 2018 - Firefox 58
> 13. März 2018 - Firefox 59
>
> 2017-09-05 - Chrome 61.0.3163
> 2017-10-17 - Chrome 62.0.3202
> 2017-12-05 - Chrome 63.0.3239
> 2018-01-23 - Chrome 64.0.3282
> 2018-03-06 - Chrome 65.0.3325
>
> and this is just 2 desktop ones! I dont want to talk about the loads of 
> updates my android device got in that time (firefox mobile, chrome and 
> samsung internet!) - oh, and btw: they still lie about the user agent all 
> time dont get me wrong, but sep 17 is freaking old in case you need to 
> reliably detect the browser!



-- 
WBR
Maxim aka solomax


Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Korbinian Bachl


- Ursprüngliche Mail -
>> even in 2009 it was considered bad: https://www.sitepoint.com/why-
>> browser-sniffing-stinks/
>> and in case that is not enough, read what the guy that invented modernizr
>> has to say:
>> http://farukat.es/journal/2011/02/499-lest-we-forget-or-
>> how-i-learned-whats-so-bad-about-browser-sniffing/
>>
>>
> I do not trust anyone who says "don't do it this way" but doesn't say how
> to do it!
> 
> There are several of "if (isBrowserX()) {...} else {...}" in Wicket JS code
> and they served well for the last decade.
> Since there are several other *Java* libraries for user agent detection
> this means that someone still finds them useful despite what other people
> claim.

unreliable things wont get reliably by pointing into the past and then telling 
that your fater did it the same way

nowadays you would use feature detection, see: 

https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection

> 
> 
>> btw:
>> https://github.com/HaraldWalker/user-agent-utils -> this is EOL, guess
>> why...
>> https://github.com/pieroxy/java-user-agent-detection/releases -> last
>> release from september 2017...
>>
>>
> Sep 2017 is like yesterday

(all only MAJOR releases!)

28. September 2017 - Firefox 56 
14. November 2017 - Firefox 57 Quantum
23. Januar 2018 - Firefox 58
13. März 2018 - Firefox 59

2017-09-05 - Chrome 61.0.3163
2017-10-17 - Chrome 62.0.3202
2017-12-05 - Chrome 63.0.3239
2018-01-23 - Chrome 64.0.3282
2018-03-06 - Chrome 65.0.3325

and this is just 2 desktop ones! I dont want to talk about the loads of updates 
my android device got in that time (firefox mobile, chrome and samsung 
internet!) - oh, and btw: they still lie about the user agent all time dont 
get me wrong, but sep 17 is freaking old in case you need to reliably detect 
the browser!


Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Martin Grigorov
On Wed, Mar 28, 2018 at 7:19 PM, Korbinian Bachl <
korbinian.ba...@whiskyworld.de> wrote:

> IMHO: its 2018 and any browser sniffing has to be dropped at all, as it
> has no use anyway and its not working reliable... what for do we need this
> at all?
>
> even in 2009 it was considered bad: https://www.sitepoint.com/why-
> browser-sniffing-stinks/
> and in case that is not enough, read what the guy that invented modernizr
> has to say:
> http://farukat.es/journal/2011/02/499-lest-we-forget-or-
> how-i-learned-whats-so-bad-about-browser-sniffing/
>
>
I do not trust anyone who says "don't do it this way" but doesn't say how
to do it!

There are several of "if (isBrowserX()) {...} else {...}" in Wicket JS code
and they served well for the last decade.
Since there are several other *Java* libraries for user agent detection
this means that someone still finds them useful despite what other people
claim.


> btw:
> https://github.com/HaraldWalker/user-agent-utils -> this is EOL, guess
> why...
> https://github.com/pieroxy/java-user-agent-detection/releases -> last
> release from september 2017...
>
>
Sep 2017 is like yesterday


>
> - Ursprüngliche Mail -
> > Von: "Maxim Solodovnik" 
> > An: dev@wicket.apache.org
> > Gesendet: Mittwoch, 28. März 2018 18:04:03
> > Betreff: [DISCUSSION] WICKET-6544 mobile browser detection
>
> > Hello All,
> >
> > While reviewing WICKET-6544 Martin propose to use JS library for this
> task
> > Here are some examples:
> > https://github.com/pieroxy/java-user-agent-detection or
> > https://github.com/HaraldWalker/user-agent-utils
> >
> > WDYT
> >
> > --
> > WBR
> > Maxim aka solomax
>


[GitHub] wicket pull request #270: [WICKET-6533] Unicode non-characters are skipped

2018-03-28 Thread solomax
GitHub user solomax opened a pull request:

https://github.com/apache/wicket/pull/270

[WICKET-6533] Unicode non-characters are skipped



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/wicket WICKET-6533-non-characters

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/270.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #270


commit b85f5c0202439b404028470883f8353a44a2e034
Author: Maxim Solodovnik 
Date:   2018-03-28T17:47:08Z

[WICKET-6533] Unicode non-characters are skipped




---


Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Maxim Solodovnik
It is always good to know you are working with IE  :)))

I would review detected browser list (for ex. to match this list:
https://developer.mozilla.org/en-US/docs/Web/API/AudioNode#Browser_compatibility)

It always can be implemented as tiny module at wicketstuff

On Thu, Mar 29, 2018 at 12:16 AM, Sven Meier  wrote:
> I agree with Korbinian: IMHO we should drop that feature.
>
> Sven
>
>
>
> Am 28.03.2018 um 18:35 schrieb Maxim Solodovnik:
>>
>> I also noticed all libraries are old :(
>>
>> Not sure "Drop this feature" is great idea
>> Some users (including me) might find it useful :))
>>
>> BTW why do we have both?
>> isBrowserMozilla())
>> isBrowserMozillaFirefox()
>>
>> On Wed, Mar 28, 2018 at 11:19 PM, Korbinian Bachl
>>  wrote:
>>>
>>> IMHO: its 2018 and any browser sniffing has to be dropped at all, as it
>>> has no use anyway and its not working reliable... what for do we need this
>>> at all?
>>>
>>> even in 2009 it was considered bad:
>>> https://www.sitepoint.com/why-browser-sniffing-stinks/
>>> and in case that is not enough, read what the guy that invented modernizr
>>> has to say:
>>>
>>> http://farukat.es/journal/2011/02/499-lest-we-forget-or-how-i-learned-whats-so-bad-about-browser-sniffing/
>>>
>>>
>>> btw:
>>> https://github.com/HaraldWalker/user-agent-utils -> this is EOL, guess
>>> why...
>>> https://github.com/pieroxy/java-user-agent-detection/releases -> last
>>> release from september 2017...
>>>
>>>
>>> - Ursprüngliche Mail -

 Von: "Maxim Solodovnik" 
 An: dev@wicket.apache.org
 Gesendet: Mittwoch, 28. März 2018 18:04:03
 Betreff: [DISCUSSION] WICKET-6544 mobile browser detection
 Hello All,

 While reviewing WICKET-6544 Martin propose to use JS library for this
 task
 Here are some examples:
 https://github.com/pieroxy/java-user-agent-detection or
 https://github.com/HaraldWalker/user-agent-utils

 WDYT

 --
 WBR
 Maxim aka solomax
>>
>>
>>
>



-- 
WBR
Maxim aka solomax


Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Sven Meier

I agree with Korbinian: IMHO we should drop that feature.

Sven


Am 28.03.2018 um 18:35 schrieb Maxim Solodovnik:

I also noticed all libraries are old :(

Not sure "Drop this feature" is great idea
Some users (including me) might find it useful :))

BTW why do we have both?
isBrowserMozilla())
isBrowserMozillaFirefox()

On Wed, Mar 28, 2018 at 11:19 PM, Korbinian Bachl
 wrote:

IMHO: its 2018 and any browser sniffing has to be dropped at all, as it has no 
use anyway and its not working reliable... what for do we need this at all?

even in 2009 it was considered bad: 
https://www.sitepoint.com/why-browser-sniffing-stinks/
and in case that is not enough, read what the guy that invented modernizr has 
to say:
http://farukat.es/journal/2011/02/499-lest-we-forget-or-how-i-learned-whats-so-bad-about-browser-sniffing/


btw:
https://github.com/HaraldWalker/user-agent-utils -> this is EOL, guess why...
https://github.com/pieroxy/java-user-agent-detection/releases -> last release 
from september 2017...


- Ursprüngliche Mail -

Von: "Maxim Solodovnik" 
An: dev@wicket.apache.org
Gesendet: Mittwoch, 28. März 2018 18:04:03
Betreff: [DISCUSSION] WICKET-6544 mobile browser detection
Hello All,

While reviewing WICKET-6544 Martin propose to use JS library for this task
Here are some examples:
https://github.com/pieroxy/java-user-agent-detection or
https://github.com/HaraldWalker/user-agent-utils

WDYT

--
WBR
Maxim aka solomax







Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Maxim Solodovnik
I also noticed all libraries are old :(

Not sure "Drop this feature" is great idea
Some users (including me) might find it useful :))

BTW why do we have both?
isBrowserMozilla())
isBrowserMozillaFirefox()

On Wed, Mar 28, 2018 at 11:19 PM, Korbinian Bachl
 wrote:
> IMHO: its 2018 and any browser sniffing has to be dropped at all, as it has 
> no use anyway and its not working reliable... what for do we need this at all?
>
> even in 2009 it was considered bad: 
> https://www.sitepoint.com/why-browser-sniffing-stinks/
> and in case that is not enough, read what the guy that invented modernizr has 
> to say:
> http://farukat.es/journal/2011/02/499-lest-we-forget-or-how-i-learned-whats-so-bad-about-browser-sniffing/
>
>
> btw:
> https://github.com/HaraldWalker/user-agent-utils -> this is EOL, guess why...
> https://github.com/pieroxy/java-user-agent-detection/releases -> last release 
> from september 2017...
>
>
> - Ursprüngliche Mail -
>> Von: "Maxim Solodovnik" 
>> An: dev@wicket.apache.org
>> Gesendet: Mittwoch, 28. März 2018 18:04:03
>> Betreff: [DISCUSSION] WICKET-6544 mobile browser detection
>
>> Hello All,
>>
>> While reviewing WICKET-6544 Martin propose to use JS library for this task
>> Here are some examples:
>> https://github.com/pieroxy/java-user-agent-detection or
>> https://github.com/HaraldWalker/user-agent-utils
>>
>> WDYT
>>
>> --
>> WBR
>> Maxim aka solomax



-- 
WBR
Maxim aka solomax


[GitHub] wicket issue #269: [WICKET-6544] mobile browser detection is improved

2018-03-28 Thread kbachl
Github user kbachl commented on the issue:

https://github.com/apache/wicket/pull/269
  
drop this "feature" completely - it just wont work reliable anyway


---


Re: [DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Korbinian Bachl
IMHO: its 2018 and any browser sniffing has to be dropped at all, as it has no 
use anyway and its not working reliable... what for do we need this at all?

even in 2009 it was considered bad: 
https://www.sitepoint.com/why-browser-sniffing-stinks/
and in case that is not enough, read what the guy that invented modernizr has 
to say: 
http://farukat.es/journal/2011/02/499-lest-we-forget-or-how-i-learned-whats-so-bad-about-browser-sniffing/


btw: 
https://github.com/HaraldWalker/user-agent-utils -> this is EOL, guess why...
https://github.com/pieroxy/java-user-agent-detection/releases -> last release 
from september 2017... 


- Ursprüngliche Mail -
> Von: "Maxim Solodovnik" 
> An: dev@wicket.apache.org
> Gesendet: Mittwoch, 28. März 2018 18:04:03
> Betreff: [DISCUSSION] WICKET-6544 mobile browser detection

> Hello All,
> 
> While reviewing WICKET-6544 Martin propose to use JS library for this task
> Here are some examples:
> https://github.com/pieroxy/java-user-agent-detection or
> https://github.com/HaraldWalker/user-agent-utils
> 
> WDYT
> 
> --
> WBR
> Maxim aka solomax


[DISCUSSION] WICKET-6544 mobile browser detection

2018-03-28 Thread Maxim Solodovnik
Hello All,

While reviewing WICKET-6544 Martin propose to use JS library for this task
Here are some examples:
https://github.com/pieroxy/java-user-agent-detection or
https://github.com/HaraldWalker/user-agent-utils

WDYT

-- 
WBR
Maxim aka solomax