You can get it on npm.
npm install mdhub --save
MdHub was created in 2015, when Memed faced a challenge building the new version of its SPA (Single Page Application):
We need to integrate some "screens" of our new SPA on third-party SPAs, something like
modules(Memed CTO, 2015)
Some requirements was listed:
Putting the SPA into an
iframe solves the problems with CSS/JS conflicts.
To be easy to use, a JS Library can be made to create the
iframe and exposes some methods to communicate with it using
To only load what will be used, the SPA can have custom compilations (one for each third-party SPA), but will be hard to mantain. Other solution was to split the SPA into
modules, and create an
iframe for each module - this is what
MdHub does and why it was created.
MdHub takes care of:
iframefor each module
iframedisplaying control (show or hide a module)
MdHubwill load it automatically)
Yes, but it's not a silver bullet. Some advantages:
Thank you for all the contributors of versions 1 and 2: Danilo Santos, Gabriel Couto, Cloves Santos, João Sales, Felipe Sousa, Rômulo Argolo, William Espindola, Carlos Júnior.