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

Javascript cleanup #5

Open
joto opened this issue Oct 18, 2018 · 1 comment
Open

Javascript cleanup #5

joto opened this issue Oct 18, 2018 · 1 comment

Comments

@joto
Copy link
Collaborator

joto commented Oct 18, 2018

The Javascript code is a bit of a mess. I am not a big Javascript expert, but I am sure some code could be cleaned up and made more modular.

Here are some more specific bits to work on:

  • jQuery is used in parts of the application but I have started phasing it out. Modern browsers natively support most of what jQuery used to provide. Some code from OpenLayers or D3 which are included anyway could be used as helpers, for instance with AJAX requests.
  • We don't need to include all of OpenLayers but should create a special build of OL only with the needed parts.
  • Some code might be put into an extension for OpenLayers.

The goal here is to get clean, simple and fast JS code. It is definitely not a goal to use some complex JS framework, especially when this means that the application would need to be "built" before it can be used. On the whole the application is simple enough that something like this isn't needed.

@joto
Copy link
Collaborator Author

joto commented Oct 20, 2018

I have removed jQuery completely using native JS code. The ajax JSON request now use the D3 library.

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

No branches or pull requests

1 participant