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

Migrate away from AngularJS #80

Open
e-alfred opened this issue Nov 22, 2019 · 6 comments
Open

Migrate away from AngularJS #80

e-alfred opened this issue Nov 22, 2019 · 6 comments

Comments

@e-alfred
Copy link
Collaborator

AngularJS is in LTS mode currently and will be deprecated in 2021 after a 3 year period. We should move away from AngularJS to Vue probably at some point in the future.

@nerzhul
Copy link
Collaborator

nerzhul commented Nov 22, 2019

@e-alfred i approve totally with you. the move has been done on ocsms if i remember but not on this. It's not difficult to move away from angular as the templating may be the same. Also the new code may be proper than before :)

@berdosi
Copy link
Contributor

berdosi commented Dec 1, 2019

Started to fool around with this issue, but there's still a lot of work to do there:
https://github.com/berdosi/weather/tree/migrate-to-vue

There are still bugs, missing features, and lots of old code abused and patched up for reuse. It more of a demo / learning project, than a meaningful contribution at the moment.

@e-alfred
Copy link
Collaborator Author

e-alfred commented Dec 13, 2019

@berdosi Nice work for a start. It isn't quite urgent as there is still support for AngularJS until 2021, but it would be good to do it until then anyway.

Maybe you can make a draft PR and work from there onwards? We could merge it the if it becomes stable sometime in the future.

@nerzhul
Copy link
Collaborator

nerzhul commented Dec 18, 2019

hello @berdosi i looked at your MR seems promising but not very readable JS code unfortunately due to the one big file :(

@berdosi
Copy link
Contributor

berdosi commented Dec 22, 2019

Hello, @nerzhul, I'll make efforts to structure it better for the to-be-merged version; it should be relatively easy to split the code to components (ocsms is a good point of reference :)).

I still have some warnings to clean up before starting to refactor, though.

@berdosi
Copy link
Contributor

berdosi commented Dec 23, 2019

I split it up to Settings / CityList / Forecast, and the components communicate with each other through a shared store. I don't consider it to be very idiomatic, but at least the file is split up.
(While app.js is still in place for my reference, it isn't linked to through main.php)

Apart from migrate-to-vue, I've started playing with migrate-to-vue-split-components, using separate templates. I consider the other version with fewer, bigger files more readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants