lanl / 4DGB

4D Genome Browser project
1 stars 2 forks source link

Re-arrange codebase and refactor Javascript library #33

Closed camtauxe closed 3 years ago

camtauxe commented 3 years ago

This PR is an implementation of my proposal in issue #14.

In general, this PR encompasses two major changes, along with several minor changes, which were mostly made to accommodate the major changes or to plan ahead for features we know we'll want in the future.

Major change 1: The three software components (the GTK Javascript library, the gentk Python module and the gtkserver.py Python server) have all been separated, and each has its own directory in the top level: client-js, client-py and server. The server directory, in addition to the gtkserver.py script also contains all of the static files that the server provides. However, the client-side javascript library is now stored in the client-js directory, and the make_release script will place a copy in the server's static directory.

Major change 2: The GTK Javascript library is now built using webpack into a single gtk.min.js file.

A few advantages to this:

All of the class names have had their GTK prefix dropped, and instead, each one is available through the global GTK object. So, for example, GTKAppState becomes GTK.AppState. Within the library itself, references to other classes are handled by requireing them at the top of the file.

Some minor changes: