The neat thing is that it starts from scratch and adds things, like pub/sub, then models, controllers and so on.
The neat thing is that it starts from scratch and adds things, like pub/sub, then models, controllers and so on.
It seems that you are leveraging the built-in event system for observers and using the dom for referencing your components. Personally, I don't feel that mvc for the web is inventing a whole lot more, just patterns and some utilities.
Having events that bubble from the child component up to the app component is an interesting approach. It simplifies the code by not having to pass controllers into views, but makes the child components less reusable in other contexts.
Btw, this structure also reminds me of backbone(1) and that riotjs 1kb blog post from ages ago(2).
I love the effort and thank you for making it.
(1) https://backbonejs.org/#View
(2) https://muut.com/blog/technology/riotjs-the-1kb-mvp-framewor....