architecture

john 2018-04-10T04:33:59.000017Z

I'm looking at how MDC uses closure modules for some inspiration: https://material.io/components/web/docs/closure-compiler/. I'm experimenting with cljs module-based code splitting here: https://github.com/johnmn3/cljs-main-code-splitting/blob/master/modules/mod_init/main.cljs It's at an extremely simply point right now, so I figured I'd drop it here to see if anyone has any strong opinions about the shape of things.

john 2018-04-10T15:58:58.000526Z

So here is an example of a "downstream" module that consumes upstream modules, provides a third party module, and implements a core module that uses the third party module: https://github.com/johnmn3/mod-acme

john 2018-04-10T16:26:46.000714Z

One thing about the defxmod macro. It could instead use the current namespace, keyified, to use as the moduleId. Then make a version of loader/set-loaded-for-this-namespace! or something, which just uses the current keyified namespace as the moduleId.

john 2018-04-10T16:29:14.000794Z

Then you could potentially just define lazily loadable module-functions in place and not have to worry about moduleIds. Just require them, call them, and if they haven't been loaded, they will be.