I've diven a bit into state of the of the modern way of doing things, prolly synonymous of state of the art. There is in my opinion three main libraries that fight for the spotlight:
Angular, which is basically a dead project
React/Redux, the most popular solution, but it's very modular.
Vue, is kind of inspired from react/redux, similarly it's very modular but the development is mostly centralized.
All three of them have a common point which is+ algorithms. That algorithm allows to declare the way the html should look in its entierity and the algorithm make it happen in the rendering graph by updating/remove/adding rendering nodes (which are in the case of webdev, most of the time: DOM objects).
I kept that idea. I created bindings on top of snabbdom.js and built what I could build, first getting inspiration from elm and redux to come up with the most minimald and most versatile framework for building web apps.
The canvas offered by this framework is summed by the followingprocedure:
Basically, it says thatprocedure produce a seed state passed to which renders the first version of the graph scene. A node from the graph scene fires an event, user specified callbacks are which are called action procedures which basically takes everything they need to:
do ajax without blocking using an imperative syntax (via call/cc)
spawn new green thread
update the state
That's where will land the business code.
Theprocedure contains the UI code.