upcoming v0.0.2 view commit logs
- The main goal of this version is to fix the unit tests that are failing and improve the test suite.
- Replaced the test suite for the one from Backbone 1.1.2
- Might replace html-to-vdom for vdom-virtualize
- Might stop inheriting
setElement
and defining its own implementation.
- Come up with virtual DOM implementation for other Marionette views.
- Strive for conceiving a reusable virtual DOM View to be extended by the leaf Marionette views (either by inheritance or mixing).
- The main goal of this version is to prove the concept of Virtual DOM over Marionette Views as it was suggested on a Marionette.js thread
- Based on virtual-dom
- Uses html-to-vdom to convert any HTML template to VDOM.
- Each time the view needs to render, it will go through the following process (specified in
attachElContent
method):- generate a new virtual DOM element from the newly generated HTML.
- diff this new virtual DOM element with the current one and obtain a patch.
- patch the current real DOM with it
- @samccone very kindly pitched in, bringing the unit test suite from Marionette and Backbone in order to assess which work needs to be done for the solution to be more solid and perhaps get released.
- Out of 90 test cases we have only gotten 3 failures, which is pretty impressive.
- I was able to verify it does really work by comparing DevTools output for 2 scenarios, virtual vs non-virtual:
Notice the increasing number of Nodes, from 628 to 629 in 10s. The Used JS Heap is pretty high and increasing.
Notice the number of Nodes stays on 403 over the same 10s. There is also plenty of more JS happening (2nd image) but the Used JS Heap is much lower.
- Fix the 3 unit tests that are failing.
- Improve the test suite.