Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5F957200D15 for ; Thu, 5 Oct 2017 09:53:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5E08C160BDA; Thu, 5 Oct 2017 07:53:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 55A481609DA for ; Thu, 5 Oct 2017 09:53:01 +0200 (CEST) Received: (qmail 18605 invoked by uid 500); 5 Oct 2017 07:53:00 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 18566 invoked by uid 99); 5 Oct 2017 07:52:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Oct 2017 07:52:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id EAF52CA10D for ; Thu, 5 Oct 2017 07:43:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.401 X-Spam-Level: X-Spam-Status: No, score=-0.401 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9j6PIT2miMrD for ; Thu, 5 Oct 2017 07:43:09 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 9F0805F569 for ; Thu, 5 Oct 2017 07:43:08 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id c77so21313749oig.0 for ; Thu, 05 Oct 2017 00:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=YQaUWP/nIfyxo4xSo+spw3LliznT9QktLimLGeEbadQ=; b=aD34+goEb1x2qhxO4GoZ85vgc+k519HFWC/l91XS5OOYWCBu0NBPv89cf+l7fG5pVh sH/vJkO7mjJX8wPgepl0Q667pOTvaQ+kqdniBDP4CddVPmjvFXYYJBG1YtmwY/E35CxT tCVCnFzssX6Er2lxsfpdtwh9V8Wg8zvi6zs1q4wMSiF0qsseAiXTzUyFsRxC2XTl1MTS YZiZd1otOp+gWnU+b9lVVNz1BqpOmTrhrkVfOmj5v5cCMRpeImAVQeHFRDna/9MXGFER +ZyTqcJSo45FiErwpoMgZKTAJXaYxeR2AKJf/Szy6TZ8COgGwe2Fd87EVIkcaxhoNGR+ JkwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=YQaUWP/nIfyxo4xSo+spw3LliznT9QktLimLGeEbadQ=; b=e0s2M+NZgHYdEbx90myBhCNwzBrri1Df53aOQNgxdxPeewwYfVaM3n7BFXHr1lOTcT 4fclYGz8OcjCGbq6h1Y4WX0r8n9C+tDKxtGg5EcBAX9nh7/W5TadqP6QzWQf+IXfFPzR xXKROPhlW7MvISWiqGrFpyC9pMKrqA31U6dZAa8ai0Dk2LKpkiI49ccMY5b+hKSPJ62l d5SPOJY93ME1aK3TJIkqVY362QvW0G1hpuAeVcxibAn75FR41/wrQhIuierMtoIAUEua 6JFMXbZxdMBcGDUlrnyw2oBn4gzZr5T/W4juHmpOfBvd387HdZhkjsE2zu22m5/kM2jn +QTw== X-Gm-Message-State: AMCzsaXOtJhJkXNpLJXq3abSMgehRSM+B+VzslBwc0hmeOn/OXDFWw6d FicNpjUmDO55wBSaGZHNh1XhEtIYS/j5ixGBEltaCw== X-Google-Smtp-Source: AOwi7QAXnTeUy4eD1Ehf38FY19HCNpbL1uo2dDjKV5wcRSmMANOQzO6GFx+UoF3fX8VyrmkMKFD+GS2sNZj6drQOlXU= X-Received: by 10.157.41.186 with SMTP id n55mr807917otb.218.1507189387132; Thu, 05 Oct 2017 00:43:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.32.200 with HTTP; Thu, 5 Oct 2017 00:43:06 -0700 (PDT) In-Reply-To: References: From: Thomas Andraschko Date: Thu, 5 Oct 2017 09:43:06 +0200 Message-ID: Subject: Re: jsf.js post 2.3 plans To: MyFaces Development Content-Type: multipart/alternative; boundary="001a113efa8e078322055ac7e013" archived-at: Thu, 05 Oct 2017 07:53:02 -0000 --001a113efa8e078322055ac7e013 Content-Type: text/plain; charset="UTF-8" Hi Werner, big +1 for doing a completely new jsf.js! Basically it would be really great to use another lang as plain js. But there is also another downside: most webdevelopers and commiters of MyFaces are fimilar with plain js but maybe not with TypeScript or else. But i think we should do it if can we can easily integrate it somehow in our maven builds. My personal opinion is that i would prefer plain js if the developers must install nodejs etc. on their machines. If everything is done by maven in the background, it's ok for me. As you already said, we actually must avoid dependencies like kotlin.js and jquery.js - thats a no go and also not really required. Regards, Thomas 2017-10-05 9:19 GMT+02:00 Werner Punz : > Hi guys > > > I just wanted to start a discussion on how we are going to proceed with > the jsf.js codebase. > The issue is following: > > Our codebase which currently is adapted by me for 2.3 is rather old. > It by now is around 9-10 years old and back then most of the stuff I did > made sense > a) The library needed to be self contained > b) There were an awful lot of browsers in use, which did not adhere to any > standards whatsoever > c) There was no real inheritance system available just the prototype > system which is one level below inheritance by allowing to access the > class/object tree and manipulate it on the fly > > So what I did was following > Implement my own class system for not having to deal with prototype > inheritance all the time > Since I needed to be self contained integrating a library like JQuery > (which also was it its infancy at that time) was out of the question > due to possible conflicts. There also was no widespread support > for querySelector on node level some browsers had it some browsers > had other workarounds to speed the dom node lookup up. > > Also no unified ajax handling, the ajax api was at its infancy and I still > had to support the archaic IE way of doing things. > > To the worse there were significant differences in dom and xml handling > between the various browsers out in the wild compared to the already > defined standards (I am speaking of you IE and mobile browsers in use back > then) > > So in the end I ended up with a codebase which is about 40-50% there just > to support legacy browsers. While I did some work to isolate the quirks > code and compile it out of the codebase there still is work to be done. > > Again all of this made sense back then... > > > Lots of things have been changed in those 10 years and now most of the > things do not make sense anymore. > > a) We have saner meta languages which allow to compile to javascript, > following candidates come to my mind > > - Typescript, a language which I amn very familiar with due to my day to > day work > - Coffeescript ... not very familiar with that one > - Kotlin... yes that one also has a javascript target compiler > > We definitely should opt for a meta compiler instead of pure js. > The reasons are many, and I can speak here atm only for Typescript > > - You can change ecma script levels on build level > - You can change the package management system in build level > - You get additional coding security by having the apis fortified at least > with some types instead of doing constantly your manual asserts > - In the end the Meta language codebase is way cleaner than the original > one > > > The downside is > > > at least for typescript the maven integration is non existent, there is a > maven clientside plugin which downloads the entire node js chain onto your > machine within a build, but my guess is we do not need to do this > for the apache integration builds, because in the end we just need the js > codebase. We can add special dev profile which enables the client side > build to build the js files. > > As for Kotlin, I have not evalauted their javascript stuff but what put me > off was that the website said you have to integrate kotlin.js which is a no > go, but this depends, if kotlin.js just implements their runtime lib we can > probably bypass that. I need to have a serious look at it. > > The plus side probably is that it has decent maven support and a perfect > IDE support on the Jetbrains IDEs. (Dont get me wrong the IDE support > of Typescript also is very good on those, I use it on a daily base) > > > Browser support: > > Since mobile browsers are up to rather recent standards nowadays the > problem is the desktop which at least in a corporate environment is moving > really slowly (I wonder corporations are really cautious regarding security > and yet often use stone old often outdated not updated anymore, browsers - > but that is just a snarky sidenote). But still there things have gotten > better. > > From a browser support standpoint we probably can strip the support pre > IE9 level which means we finally at least can use a standard ajax api, ajax > multiform requests instead of the iframe hack I had to introduce for jsf > 2.2. > > I would prefer to have IE11 as baseline, given that most corporations > probably have frozen their environment on a Windows 7 IE11 baseline by now, > but I guess we have to drag at least IE9 with us with some third party lib > support. > > By mildly adding small external libraries and avoiding shims > we might get a small query monadish api on top of node.selectorAll like > jquery. > > I still would avoid to integrate jquery because we have a core lib > so everything integrated needs to be small. We do not have the luxury of > for instance Prime Faces which can require or bundle a huge lib like JQuery > and JQuery UI. > > Also we definitely would need promises (again rip the code out of a proven > shim lib but do not shim it, if it is not supported by the browser > natively) > > So my proposal is, after 2.3 I will start with a reimplementation which > might take some time in a saner environment and with a newly defined > baseline. > And once I am done we can drop it in as alternative jsf.js codebase > for the users (we still keep the old one for 2.3) > And for 2.4 upwards we will drop the legacy codebase entirely and just > use the new reworked and cleaned up one. > > > Just a little bit of food for discussion. > > Werner > > > > > > --001a113efa8e078322055ac7e013 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Werner,

big +1 for doing a = completely new jsf.js!

Basically it would be really great to u= se another lang as plain js.
But there is also another downside: m= ost webdevelopers and commiters of MyFaces are fimilar with plain js but ma= ybe not with TypeScript or else.
But i think we should do it i= f can we can easily integrate it somehow in our maven builds.
My persona= l opinion is that i would prefer plain js if the developers must install no= dejs etc. on their machines. If everything is done by maven in the backgrou= nd, it's ok for me.

As you already said, we actually = must avoid dependencies like kotlin.js and jquery.js - thats a no go and al= so not really required.

Regards,
Thomas
=


=
2017-10-05 9:19 GMT+02:00 Werner Punz <= werner.punz@gmail.com>:
Hi = guys


I just wanted to start a discussion on how we are going to proceed with the= jsf.js codebase.
The issue is following:

Our codebase which currently is adapted by me for 2.3 is rather old.
It by now is around 9-10 years old and back then most of the stuff I did ma= de sense
a) The library needed to be self contained
b) There were an awful lot of browsers in use, which did not adhere to any = standards whatsoever
c) There was no real inheritance system available just the prototype system= which is one level below inheritance by allowing to access the class/objec= t tree and manipulate it on the fly

So what I did was following
Implement my own class system for not having to deal with prototype inherit= ance all the time
Since I needed to be self contained integrating a library like JQuery (whic= h also was it its infancy at that time) was out of the question
due to possible conflicts. There also was no widespread support
for querySelector on node level some browsers had it some browsers
had other workarounds to speed the dom node lookup up.

Also no unified ajax handling, the ajax api was at its infancy and I still = had to support the archaic IE way of doing things.

To the worse there were significant differences in dom and xml handling
between the various browsers out in the wild compared to the already define= d standards (I am speaking of you IE and mobile browsers in use back then)<= br>
So in the end I ended up with a codebase which is about 40-50% there just t= o support legacy browsers. While I did some work to isolate the quirks code= and compile it out of the codebase there still is work to be done.

Again all of this made sense back then...


Lots of things have been changed in those 10 years and now most of the thin= gs do not make sense anymore.

a) We have saner meta languages which allow to compile to javascript, follo= wing candidates come to my mind

- Typescript, a language which I amn very familiar with due to my day to da= y work
- Coffeescript ... not very familiar with that one
- Kotlin... yes that one also has a javascript target compiler

We definitely should opt for a meta compiler instead of pure js.
The reasons are many, and I can speak here atm only for Typescript

- You can change ecma script levels on build level
- You can change the package management system in build level
- You get additional coding security by having the apis fortified at least = with some types instead of doing constantly your manual asserts
- In the end the Meta language codebase is way cleaner than the original on= e


The downside is


at least for typescript the maven integration is non existent, there is a m= aven clientside plugin which downloads the entire node js chain onto your m= achine within a build, but my guess is we do not need to do this
for the apache integration builds, because in the end we just need the js c= odebase. We can add special dev profile which enables the client side build= to build the js files.

As for Kotlin, I have not evalauted their javascript stuff but what put me = off was that the website said you have to integrate kotlin.js which is a no= go, but this depends, if kotlin.js just implements their runtime lib we ca= n probably bypass that. I need to have a serious look at it.

The plus side probably is that it has decent maven support and a perfect ID= E support on the Jetbrains IDEs. (Dont get me wrong the IDE support
of Typescript also is very good on those, I use it on a daily base)


Browser support:

Since mobile browsers are up to rather recent standards nowadays the proble= m is the desktop which at least in a corporate environment is moving really= slowly (I wonder corporations are really cautious regarding security and y= et often use stone old often outdated not updated anymore, browsers - but t= hat is just a snarky sidenote). But still there things have gotten better.<= br>
From a browser support standpoint we probably can strip the support pre IE9= level which means we finally at least can use a standard ajax api, ajax mu= ltiform requests instead of the iframe hack I had to introduce for jsf 2.2.=

I would prefer to have IE11 as baseline, given that most corporations proba= bly have frozen their environment on a Windows 7 IE11 baseline by now, but = I guess we have to drag at least IE9 with us with some third party lib supp= ort.

By mildly adding small external libraries and avoiding shims
we might get a small query monadish api on top of node.selectorAll like jqu= ery.

I still would avoid to integrate jquery because we have a core lib
so everything integrated needs to be small. We do not have the luxury of fo= r instance Prime Faces which can require or bundle a huge lib like JQuery a= nd JQuery UI.

Also we definitely would need promises (again rip the code out of a proven = shim lib=C2=A0 but do not shim it, if it is not supported by the browser na= tively)

So my proposal is, after 2.3 I will start with a reimplementation which mig= ht take some time in a saner environment and with a newly defined baseline.=
And once I am done we can drop it in as alternative jsf.js codebase
for the users (we still keep the old one for 2.3)
And for 2.4 upwards we will drop the legacy codebase entirely and just
use the new reworked and cleaned up one.


Just a little bit of food for discussion.

Werner






--001a113efa8e078322055ac7e013--