Hacker News new | ask | show | jobs
by DonHopkins 2762 days ago
Thank you! Did you roll your own virtual DOM, or is there a library you're using?

Any suggestions for interesting parts of the code I should snoop around? ;)

1 comments

I wrote my own,

Tabulator has zero dependencies for its core functionality

If you have the time, writing a virtual DOM can be an excellent lesson in the intricacies of DOM manipulation, learning exactly what order to make calls in to optimize the number of times the DOM is updated and reduce the load on the system.

Though if you are not trying to write a lot of data to the screen they are not worth doing to be fair.

Tabulator needs one because if you try and load 10,000 rows of a table into the DOM at the same time it will freeze up as most browsers cant handle that load, but for simpler UI elements it may not be worth the added complexity.

In the documentation for tabulator there is an "Architecture Concepts" section that has a number of pages that provide a bit of detail about how Tabulator works.

The virtual DOM details can be found here: http://tabulator.info/docs/4.1/virtual-dom

and some basic lifecycle info can be found here: http://tabulator.info/docs/4.1/lifecycle