Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 2.92 KB

changelog.md

File metadata and controls

53 lines (36 loc) · 2.92 KB

Overview

  • The main goal of this version is to fix the unit tests that are failing and improve the test suite.

Features

  • 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.

Next steps

  • 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).

Overview

  • 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

Features

  • 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:
Non-virtual

screen shot 2014-12-26 at 3 32 55 pm screen shot 2014-12-26 at 3 33 29 pm

Notice the increasing number of Nodes, from 628 to 629 in 10s. The Used JS Heap is pretty high and increasing.

Virtual

screen shot 2014-12-26 at 3 30 55 pm screen shot 2014-12-26 at 3 31 47 pm

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.

Next steps

  • Fix the 3 unit tests that are failing.
  • Improve the test suite.