4 ms·
What would be the point of implementing the same thing the same way that has already been done a thousand times by others? It's a DOM, and it's virtual; hence a
by codr4life 10y ago
What would be the point of implementing the same thing the same way that has already been done a thousand times by others? It's a DOM, and it's virtual; hence a virtual DOM, period. Like I mentioned in the post, this is a foundation on which change-tracking and callbacks will be added as opt-in features.
- deleted 10y ago[deleted]
- alnitak 10y agoVirtual DOMs are typically used to reduce the number of operations needed to update the real DOM. In order to achieve that, a virtual DOM is typically used to diff the previous and the next state of the DOM (before and after the data changes), and based on this diff calculate the shortest amount of steps to modify the real DOM to represent the new data. While any DOM that doesn't render its tree can be considered a virtual DOM semantically speaking, the idiomatic usage of it so far is not achieved by this current work. It is only confusing to the reader, who might have seen this term used in other popular projects. I see this more as a DOM builder, similar to JSX for example.
- codr4life 10y agoWhich part of 'this is a foundation on which change-tracking and callbacks will be added as opt-in features' didn't you understand? It's a DOM and it's virtual, hence a virtual DOM.
- LoSboccacc 10y agoFoundations for a house isn't a house
- millstone 10y agoA DOM refers to the programmatic interface (the Object Model), as distinct from the web browser's textual (Text Markup) interface. If the difference isn't clear, consider pre-JavaScript browsers: they rendered HTML with no DOM at all. This project goes through the text interface, so "virtual HTML" might be more apt than "virtual DOM."
- mikekchar 10y agoProbably I should have kept out of the discussion. Sounds like you are having a hard time of it. Whatever you call it, it looks interesting and I'll be very curious to see how you tackle the opt-in features.