[
https://issues.apache.org/jira/browse/ATLAS-3819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151875#comment-17151875
]
Csaba Koncz commented on ATLAS-3819:
------------------------------------
- the Typesecript loader is not needed, it is only an option. As it has no
runtime implications, we might discard it if it slows down the build too much.
I would keep it until we can blame something serious on it.
babel-loader can definitely be added for being able to use ES6 in javascript
sources, I will configure it and add an example.
- express is used mainly because of the API requests proxying at
[https://github.com/csabakoncz/atlas-newui/blob/master/server.js#L33]
This way I have the Java Atlas server running somewhere and I can test
different versions of the UI with the same REST api.
The nodejs+express server is used only for development, the packaging can be
done the old way (i.e. the content of the 'dist' folder is added to atlas.war).
I do not plan changes to packaging/deployment (atlas.war is fine, although I
have seen questions about separating the UI from the backend).
My original plan with Typescript was to have typings for API responses (maybe
generated from the swagger.json). That way we might have Java-like content
assist when implementing the views.
> 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)