Hacker News new | ask | show | jobs
by olifolkerd 2762 days ago
Hey Don,

on the whole the key is to stick to vanilla JS and avoid trying to use to forcible a design paradigm that could conflict with other frameworks.

Removing dependencies on other libraries was key to making it interoperable.

Everything in Tabulator is built to be extensible so where an incompatibility exists it is easy to build a solution for a particular framework.

Tabulator still has one hangup in the way it works, in that it dosnt use reactive data (changing the array you passed into the table, does not automatically update the table, unlike react and view, you have to bind watchers at the moment) but this will be coming in the next release. at which point they should all work harmoniously

The biggest challenge is to ensure that things are drawn correctly at the correct time. Because Tabulator uses a virtual DOM it makes it a since to redraw parts of the table when needed

1 comments

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? ;)

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