neuroanatomy / thresholdmann

A tool to apply a smoothly varying threshold to a nifti image
https://neuroanatomy.github.io/thresholdmann/index.html
ISC License
3 stars 2 forks source link

[joss][packaging][question] CDN vs. webpacking? #23

Closed sneakers-the-rat closed 5 months ago

sneakers-the-rat commented 6 months ago

Part of: https://github.com/openjournals/joss-reviews/issues/6336

First, let me say that i always love seeing your work because I love how it is framework-free, vanilla JS that is just ready to run in the browser. So this question is certainly not me saying "you must do super heavy contemporary javascript stuff" but more thinking aloud about some of the tradeoffs.

So y'all have a chain of packages that are all good, but the dependency chain is also getting a little opaque and I am worrying a bit about maintainability - will y'all get to a point in 5 years where the connections between packages become too complex to handle?

For example:

Say an update is needed in one of those packages, how will y'all know all the downstream packages that need to get a patch release?

Another problem is that it becomes impossible to do what might be one of the best things about small-web tools like this, and that's use it offline/in low web resource contexts: one needs an internet connection and access to cdn.jsdelivr.net (and for that to be allowable by CORS).

I wonder how y'all feel about making these packages es6 (or whatever) packages so they could be added to project dependencies, and then use a very simple webpack configuration to create batteries-included, no network required distribution versions? Those would then be totally self-contained html files, would also allow you to reuse parts of the packages potentially more easily, and bump all dependencies up to the top level of the package for inspectability and maintenance.

I'd be happy to PR to show how simple that could be (and wouldn't require restructuring literally everything) if you want.

again this isn't required for the review, but me trying to think aloud about impacts of this structure (which works!) 5 or 10 years down the line :)

katjaq commented 5 months ago

If you agree with our implementations based on your other issues and the current code structure, we think this should now be the (for the moment) final code and we would be very happy if your proposition still stands to show us how this could be packaged and work this way <3

sneakers-the-rat commented 5 months ago

I am very happy with your current code! just opened an example PR. feel free to close this whenever you'd like :)

katjaq commented 5 months ago

Thanks a lot for this draft PR @sneakers-the-rat . We are learning so much with you! 🥰 We will look into it. Thank you for not requiring this for the JOSS review and giving us the opportunity to continue this effort independent from it. <3

sneakers-the-rat commented 5 months ago

Of course!!! The only things I would "require" are the things on the checklist, the rest are just ideas and suggestions up to your discretion - its your work, you know it better than me :)