Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven JS compressor + Faces.js optimization + partial submit #5141

Merged
merged 2 commits into from
Jan 28, 2023

Conversation

pizzi80
Copy link
Contributor

@pizzi80 pizzi80 commented Jun 27, 2022

in 4.0.1-SNAPSHOT there is a bug
#5140

so I had to create a separate branch from 4.0.0 official release in my fork and commit/push

Maven

  • Removed yuicompressor (dead project with no support for ES6+ js)
  • Added Google Closure maven plugin for minification

Faces JS

  • tested and minified with ECMASCRIPT5_STRICT profile of Google Closure
  • use strict
  • const and let instead of var
  • Removed IE-5-6-7-8-9-10 support
  • Removed IE 5-6-7 hacks and memory hacks
  • Removed FrameTransport for file upload
  • Removed unused and very old functions
  • Removed OpenAjax registration OpenAjax inside faces.js jakartaee/faces#1695
  • FormData for Multipart form data and File upload
  • Many minor optimizations
  • for..of instead of for with index
  • 10 kB Minified and Gzipped

Faces JS - Partial Submit

#5045
#5040

jakartaee/faces#1598

Maven
 - Removed yuicompressor (dead project with no support for ES6+ js)
 + Added Google Closure maven plugin for minification

Faces JS
 + tested and minified with ECMASCRIPT5_STRICT profile of Google Closure
 + use strict
 + const and let instead of var
 - Removed IE-5-6-7-8-9-10 support
 - Removed IE 5-6-7 hacks and memory hacks
 - Removed FrameTransport
 - Removed / Commented out unused and very old functions and code
 + FormData for File upload
 + Many minor optimizations
 + for..of instead of for with index
 + Partial Submit ported and adapted from OmniFaces
 + 10 kB Minified and Gzipped

Signed-off-by: pizzi80 <paolo@given2.com>
* @ignore
*/
// switch to an async IIFE?
// TODO: async requires Safari 10... it was released on 2017... it's ok?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to wait until we can convert to typescript.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've spent some time to investigate the overall deprecation of old software...

Actually Safari 10 - 11 - 12 - 13 - 14 are not supported anymore by Apple

Even a 10 years old Macbook can upgrade to
"Big Sur", which include Safari version 15.5

https://discussions.apple.com/thread/253968805

IOS 11 with Safari 11 is availble since September 2017 ( 5 years ago )
and it's available for upgrade even of iPhone 5S (which is a 2013 phone)

https://www.wired.co.uk/article/ios-11-features-update-download-release-date-uk#:~:text=Which%20devices%20support%20iOS%2011,2%20and%205th-gen%20iPad

IE11 is official in EOL from Microsoft

https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support

So it is more than safe to updagrade to full ES6 support with async/await and Promise

Even more If you think that at the moment:

  1. the are no Official Application Servers supporting Jakarta EE 10
  2. there will be no Official Application Servers supporting Jakarta EE 10.1 before March 2023
    (when Faces 4.1 will probably be released)

A side note on TypeScript

ES2022 is around the corner and is on par with TypeScript

https://dev.to/jasmin/whats-new-in-es2022-1de6

Obviously anyone is free do whatever they want with open source code but to me
rewrite all that code to TypeScript in 2023 is only a waste of (precious) time which
could spent to improve Java classes to perform better and cleaner and resolve bugs

my 2 cents

@pizzi80
Copy link
Contributor Author

pizzi80 commented Jul 1, 2022

is there a proper way to push other commits to faces.js to this PR
or I have to delete this and create a new one?

@BalusC BalusC changed the base branch from master to 4.0 November 16, 2022 19:54
@BalusC BalusC changed the base branch from 4.0 to master January 28, 2023 18:01
@BalusC
Copy link
Contributor

BalusC commented Jan 28, 2023

Merged. This will end up in next minor version 4.1.

@pizzi80 pizzi80 deleted the 4.0.0_pizzi branch June 19, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants