Comments (6)
As we have to rewrite the whole UI code within 0.6 - i think that this could be any easy point to change a lot in the UI logic as well. So I would do #34 within the refactoring from agnularjs to react. Otherwise we would rewrite the code twice.
About the java build. The build fails if the Typescript code does not compile as well on test failures. For the javascript code, this was true. I added the --bail options to the webpack build. This causes also javascript errors to fail the build.
As we want to completely switch to typescript, i would ignore the javascript errors but create a solid build chain for the typescript code. I copied your tslint.conf and added tslint to the build to fail on errors and on warnings.
from softvis3d.
All of the acceptance criteria is done:
- Integrate a simple react component somewhere in the angular app view
- Write a plain typescript class which can be used within the current angular app view
- Write simple tests with karma/jasmine for the typescript class
What i still want to check is how the two applications can talk to each other. Example implementation can be found here:
https://www.bimeanalytics.com/engineering-blog/you-put-your-react-into-my-angular/
This would enable us to replace one component after another which would be great.
Open issues:
Build is not optimal yet. Javascript console shows:
"WARNING: Tried to load angular more than once."
from softvis3d.
Although it was pretty easy to integrate react within the same webpage as the existing angularjs app, it is pretty hard to integrate the two things. Especially if it gets to communication with each other and haven an react component within an angular app. As far as i have seen for now, I think this would make everything more complicated instead of easy - which was the initial though for this.
So, i would suggest the following:
Current version 0.6.0:
- Start to rewrite most of the business logic code from JS to Typescript. This integration is easy and works well.
- LayoutProcessor
- Softvis3dModel
- Parts of FileLoaderController
- TreeService
- Parts ViewerService
- Remove the react code for now
Next version 0.6.1:
- Completely switch from angularjs to react in one big bang
From my point of view, although it is a big bang then, it gets us focussed not on the framework but on the features. What do you think?
from softvis3d.
Sounds like a solid strategy.
Do we want to refactor the business logic as well for version 0.6? I would love to separate the "drawing configuration" a little bit more from the "infobar and user interaction". But the old behavior still has to work with a separate abstraction layer, so it might be a lot more work...
Also (for the build chain) i would totally recommend the typescript build to fail, if the linter or tests don't succeed. At the Moment the Java-Build still exits with code 0
should webpack fail, but the result contains outdated or no javascript code. Also there are theese 1k linter warnings
This is my tslint configuration with a strict build chain for CCV
{
"extends": "tslint:latest",
"rules": {
"max-line-length": [true, 125],
"ordered-imports": false,
"object-literal-sort-keys": false,
"interface-name": [true, "never-prefix"],
"variable-name": ["check-format", "allow-leading-underscore"],
"trailing-comma": [true, "never"],
"no-bitwise": false,
"quotemark": [true, "double"],
"eofline": false,
"no-constructor-vars": true
}
}```
from softvis3d.
I'd recommend using TypeScript 2.0 (beta) asap. The changes are quite significant and a later migration would be even more painful, once the alle the modules are already written in TS 1.8.
For updating change the version for typescript in package.json
to "^2.0.0" or "beta" will suffice.
Also for one of the best changes in TS2.0 the option strictNullChecks needs to be enabled in the tsconfig.json
. For more Info on strictNullChecks see here
from softvis3d.
All classes but the following are now written in typescript:
- UI controller
- AngularJS framework bootstrap classes
- base-frontend.model folder (no typescript definitions available yet)
I would propose to close this issue and do the rest of the work in the next milestone "Frontend code refactoring 2".
from softvis3d.
Related Issues (20)
- We need a DIC HOT 6
- Remove getVisualization webservice and replace with frontend implementation HOT 4
- New scm metric number of commits HOT 1
- Format Date of Last Commit HOT 2
- Format Date of Last Commit HOT 1
- illustrator.draw(version) blocks UI thread HOT 4
- Refactor LoadAction / StatusQueue implementation
- Road Trimming HOT 1
- React component is not closed or destroyed if the plugin is not longer visible
- Project structure error since SQ 6.4 HOT 1
- Dark theme for all UI elements HOT 1
- Dark theme for packages and buildings in visualization
- Fix SonarQube 7.6 api changes
- Placeholder logo is no displayed
- More color choices for the color of the buildings HOT 9
- switch through default viewports
- Problem with sonarqube 8.8 HOT 4
- Add links to folders to open component and measure page in a new tab
- Scene classes refactoring and tests
- Reset camera position issues after reset camera HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from softvis3d.