Closed avkoehl closed 3 years ago
great idea! I also think the various js frameworks are really good about this (from what I've been learning this weekend. this might all be old news to you but it's worth mentioning just in case). Vue.js is super self-contained, automatically modularizes your code within a web app, and is able to wrap functions so you have the CSS/HTML and js all within a single script. its popularity has also exploded in the last two years. React and Angular are the other two options for managing code, and both are super popular for making web apps. obviously we can do everything in vanilla js that we could do with these frameworks, but if we're having trouble sorting out the code and are planning an overhaul, now is the time to consider using one of these three.
Chandni refactored the javascript in the mongo branch that has now been merged into master
IN the future we should use vue, for sure
Motivation
General refactor of the code. Currently the code is a mess of javascript files, each one including a different function that is not properly documented. Very hard to read through and to understand. After a code review with Chandni, one idea was to merge all the javascript functions into diffferent modules. Each module will be a single file containing many functions that share a theme (i.e php calls, or plotting). For now will just make a big util.js and graph_util.js script that contains everything. Will need to update html that includes the javascript (i.e
Deliverable
A pull request with the two modules and updated html.