habbes / xaval

Interactive web-based playground for computer vision exploration and experimentation
https://xaval.habbes.xyz
5 stars 0 forks source link

Reorganize the Xaval "standard library" #19

Closed habbes closed 6 years ago

habbes commented 6 years ago

Instead of having several global objects like imviewer, imsource, widgets, etc., Xaval should expose the modules in an organised and structured way to avoid polluting the namespace.

I think there should be a root module from which other submodules and objects are accessible. For example xaval.io.imviewer or xaval.io.imageViewer, xaval.io.files, xaval.ext.cv, xaval.core.widget.WidgetTemplate etc.

Maybe commonly used modules can be exposed on the globally for convenience, like cv, io, etc.

And to import a module or an object, one would easily do:

const { imageViewer } = xaval.io;

So I should think about a suitable library structure.

habbes commented 6 years ago

This was addressed by #37's introduction of a root xaval module. The library however is open of reorganisation. I will close this task and open another when when there's a better way to reorganise the library.