[jira] [Comment Edited] (ATLAS-3819) Modernize client side technology stack
[ https://issues.apache.org/jira/browse/ATLAS-3819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153242#comment-17153242 ] Keval Bhatt edited comment on ATLAS-3819 at 7/8/20, 5:47 AM: - [~Koncz] I think one more improvement you can add for proxy. which is the use of webpack-dev-server proxy instead of express node server. [https://webpack.js.org/configuration/dev-server/#devserverproxy] was (Author: kevalbhatt18): [~Koncz] I think one more improvement you can do for proxy. Instead of creating express node server why do you use the proxy which is already handled by webpack-dev-server. [https://webpack.js.org/configuration/dev-server/#devserverproxy] > Modernize client side technology stack > -- > > Key: ATLAS-3819 > URL: https://issues.apache.org/jira/browse/ATLAS-3819 > Project: Atlas > Issue Type: Improvement > Components: atlas-webui >Affects Versions: 3.0.0 >Reporter: Csaba Koncz >Priority: Major > Attachments: image-2020-07-04-16-42-10-643.png > > > While RequireJS has its merits and advantages, it might be worth considering > replacing it with another technology. > A bundle loader like Webpack would open up a number of possibilities: > - use of ES6 modules, which immediately improves tooling support > - use TypeScript, which improves tooling support even more > - a manageable code base would enable refactoring of the JavaScript code so > that no logic happens in the module initialization code, > which in turn would make it possible to write tests for the JavaScript logic. > As a POC I created a NodeJS project that transforms the current dashboardv2 > code into Webpack bundles and demonstrates > that the UI is able to work without RequireJS. > Right now the JavaScript sources and index.html are used unchanged, > but the next step would be to start converting the source to ES6 modules. > Here is the code: https://github.com/csabakoncz/atlas-newui > The most important file there is `webpack.config.js` that takes over the role > of RequireJS.config. > The other file of interest might be `src/index.ts` which demonstrates the > ability to use TypeScript code even now. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (ATLAS-3819) Modernize client side technology stack
[ https://issues.apache.org/jira/browse/ATLAS-3819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153087#comment-17153087 ] Csaba Koncz edited comment on ATLAS-3819 at 7/7/20, 8:48 PM: - Added babel-loader for JavaScript source files: [https://github.com/csabakoncz/atlas-newui/pull/14] This opens up a further possibility, namely to bundle only the polyfills for the ES6 features we actually use. (right now we have all polyfills in the bundles because I included them all in index.ts: [https://github.com/csabakoncz/atlas-newui/pull/12/files#diff-f41e9d04a45c83f3b6f6e630f10117feR1)] But with babel-preset-envs' useBuiltIns="usage" we can have Babel insert imports only for the polyfills in use. ( [https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage |https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage]) Will try that too. was (Author: koncz): Added babel-loader for JavaScript source files: https://github.com/csabakoncz/atlas-newui/pull/14 This opens up a further possibility, namely to bundle only the polyfills for the ES6 features we actually use. (right now we have all polyfills in the bundles because I included them all in index.ts: [https://github.com/csabakoncz/atlas-newui/pull/12/files#diff-f41e9d04a45c83f3b6f6e630f10117feR1)] But with babel-preset-envs' useBuiltIns="usage" we can have Babel insert imports only for the polyfills in use. ( [https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage |https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage]) |https://babeljs.io/docs/en/babel-preset-env#usebuiltins]Will try that too.| > Modernize client side technology stack > -- > > Key: ATLAS-3819 > URL: https://issues.apache.org/jira/browse/ATLAS-3819 > Project: Atlas > Issue Type: Improvement > Components: atlas-webui >Affects Versions: 3.0.0 >Reporter: Csaba Koncz >Priority: Major > Attachments: image-2020-07-04-16-42-10-643.png > > > While RequireJS has its merits and advantages, it might be worth considering > replacing it with another technology. > A bundle loader like Webpack would open up a number of possibilities: > - use of ES6 modules, which immediately improves tooling support > - use TypeScript, which improves tooling support even more > - a manageable code base would enable refactoring of the JavaScript code so > that no logic happens in the module initialization code, > which in turn would make it possible to write tests for the JavaScript logic. > As a POC I created a NodeJS project that transforms the current dashboardv2 > code into Webpack bundles and demonstrates > that the UI is able to work without RequireJS. > Right now the JavaScript sources and index.html are used unchanged, > but the next step would be to start converting the source to ES6 modules. > Here is the code: https://github.com/csabakoncz/atlas-newui > The most important file there is `webpack.config.js` that takes over the role > of RequireJS.config. > The other file of interest might be `src/index.ts` which demonstrates the > ability to use TypeScript code even now. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (ATLAS-3819) Modernize client side technology stack
[ https://issues.apache.org/jira/browse/ATLAS-3819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153087#comment-17153087 ] Csaba Koncz edited comment on ATLAS-3819 at 7/7/20, 8:48 PM: - Added babel-loader for JavaScript source files: https://github.com/csabakoncz/atlas-newui/pull/14 This opens up a further possibility, namely to bundle only the polyfills for the ES6 features we actually use. (right now we have all polyfills in the bundles because I included them all in index.ts: [https://github.com/csabakoncz/atlas-newui/pull/12/files#diff-f41e9d04a45c83f3b6f6e630f10117feR1)] But with babel-preset-envs' useBuiltIns="usage" we can have Babel insert imports only for the polyfills in use. ( [https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage |https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage]) |https://babeljs.io/docs/en/babel-preset-env#usebuiltins]Will try that too.| was (Author: koncz): Added babel-loader for JavaScript source files: [https://github.com/csabakoncz/atlas-newui/pull/14 ] This opens up a further possibility, namely to bundle only the polyfills for the ES6 features we actually use. (right now we have all polyfills in the bundles because I included them all in index.ts: [https://github.com/csabakoncz/atlas-newui/pull/12/files#diff-f41e9d04a45c83f3b6f6e630f10117feR1)] But with babel-preset-envs' useBuiltIns="usage" we can have Babel insert imports only for the polyfills in use. ([|https://babeljs.io/docs/en/babel-preset-env#usebuiltins] [https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage] [) |https://babeljs.io/docs/en/babel-preset-env#usebuiltins]Will try that too. > Modernize client side technology stack > -- > > Key: ATLAS-3819 > URL: https://issues.apache.org/jira/browse/ATLAS-3819 > Project: Atlas > Issue Type: Improvement > Components: atlas-webui >Affects Versions: 3.0.0 >Reporter: Csaba Koncz >Priority: Major > Attachments: image-2020-07-04-16-42-10-643.png > > > While RequireJS has its merits and advantages, it might be worth considering > replacing it with another technology. > A bundle loader like Webpack would open up a number of possibilities: > - use of ES6 modules, which immediately improves tooling support > - use TypeScript, which improves tooling support even more > - a manageable code base would enable refactoring of the JavaScript code so > that no logic happens in the module initialization code, > which in turn would make it possible to write tests for the JavaScript logic. > As a POC I created a NodeJS project that transforms the current dashboardv2 > code into Webpack bundles and demonstrates > that the UI is able to work without RequireJS. > Right now the JavaScript sources and index.html are used unchanged, > but the next step would be to start converting the source to ES6 modules. > Here is the code: https://github.com/csabakoncz/atlas-newui > The most important file there is `webpack.config.js` that takes over the role > of RequireJS.config. > The other file of interest might be `src/index.ts` which demonstrates the > ability to use TypeScript code even now. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (ATLAS-3819) Modernize client side technology stack
[ https://issues.apache.org/jira/browse/ATLAS-3819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17151768#comment-17151768 ] Keval Bhatt edited comment on ATLAS-3819 at 7/6/20, 6:02 AM: - [~Koncz] thanks for coming up with the improvement. I have checked the repo -> [https://github.com/csabakoncz/atlas-newui |https://github.com/csabakoncz/atlas-newui] and have few questions: can we use webpack-dev-server instead of creating an express node server because we need a server only for development. Do we need typescript loader for atlas code? We can use babel-loader for es6 which can easily be used in the current atlas code. was (Author: kevalbhatt18): [~Koncz] thanks for coming up with the improvement. I have checked the repo -> [https://github.com/csabakoncz/atlas-newui |https://github.com/csabakoncz/atlas-newui] and have few questions: can we use webpack-dev-server instead of creating an express node server because we need a server only for development. Do we need typescript loader for atlas code? for backbone, we are using plain javascript. we can use babel-loader for es6. > Modernize client side technology stack > -- > > Key: ATLAS-3819 > URL: https://issues.apache.org/jira/browse/ATLAS-3819 > Project: Atlas > Issue Type: Improvement > Components: atlas-webui >Affects Versions: 3.0.0 >Reporter: Csaba Koncz >Priority: Major > Attachments: image-2020-07-04-16-42-10-643.png > > > While RequireJS has its merits and advantages, it might be worth considering > replacing it with another technology. > A bundle loader like Webpack would open up a number of possibilities: > - use of ES6 modules, which immediately improves tooling support > - use TypeScript, which improves tooling support even more > - a manageable code base would enable refactoring of the JavaScript code so > that no logic happens in the module initialization code, > which in turn would make it possible to write tests for the JavaScript logic. > As a POC I created a NodeJS project that transforms the current dashboardv2 > code into Webpack bundles and demonstrates > that the UI is able to work without RequireJS. > Right now the JavaScript sources and index.html are used unchanged, > but the next step would be to start converting the source to ES6 modules. > Here is the code: https://github.com/csabakoncz/atlas-newui > The most important file there is `webpack.config.js` that takes over the role > of RequireJS.config. > The other file of interest might be `src/index.ts` which demonstrates the > ability to use TypeScript code even now. -- This message was sent by Atlassian Jira (v8.3.4#803005)