/webservice refactoring
GabriFila opened this issue · 2 comments
This issue defines the path to refactor the code of the webservice folder.
Evolution path
The path described aims to provide a way to refactor the code while still being able to develop new features. This is not an ideal solution, because there will be some new features that will not match the new refactor style until it is fully completed. Also, some time will be spent to refactor the new features in the 'new' way. After the refactoring is complete all new parts of the code will need to respect the new guidelines and architecture.
Phase 1 - cleaning
- setup ESlint (for the moment just to get used to it, is not required for commit)
- clean package.json
- redistributed packages between dependencies and devDependacies
- remove unnecessary packages
- optimize MUI imports (change non-defaults to defaults and use @material-ui/core)
- remove unnecessary components (Home.js)
- completely remove bootstrap and w3c ands unsued css files
Phase 2 - prepare to major code changes
- remove unnecessary CSS
- setup ESlint (on the pre-commit hook and GitHub action)
- add coding guidelines to repo guide for contributing
from this point forward all coding guidelines and ESLint must be respected
Phase 3 - write documentation and refactor code
- move dashboard to a subroute (could be
/app
) #318 - create a single component for lists, which will be filled with different props
- improve mobile visualization
- make only one watcher active at the time (prof or student)
- write what the GUI has to do
- write component tree of new project
- write documentation of the project and start refactoring: these 2 steps can be done in parallel, no need to have the all documentation written before starting refactoring but can do a part of docs and then implement it. This is to avoid freezing development.
- confirm development pipeline in order not to do->decide->redo:
- propose mockup (tools or code) to other team members on Slack
- team accepts final mockup on Slack
- define react implementation (components, components tree if design is too complex)
- implementation
Additional out-of-order refinements
- look more into feasibilty of a /login page - due to the high integration with keycloak, is not easy to make it in React, it could be possible to make it using Keycloak template
- check for bundle size optimization with webpack tree-shaking (especially for K8s_library)
- improve the compatibility of
npm run prettify-all
Note on ESLint
The adoption of ESLint will be incremental: first, disable to familiarize with it, then with some feature disabled, then in future some other feature could be added for better code quality
Hi @GabriFila! Great work from you guys from SIG-UI! Keep going the good work!
Closing due to new liqo dash usage