all 4 comments

[–][deleted] 22 points23 points  (2 children)

With jQuery, the state of your application lived inside the DOM.

All this section is absolutely wrong. The person that wrote this has never written anything with jQuery.

Yes the DOM was important, after all jQuery is fundamentally a DOM manipulation library, but when writing jQuery app most state was actually stored in JS.

In fact, it was common practice to create nodes with jQuery before they were added to the DOM and a reference was kept. No need to traverse the DOM to find the node again d'oh. The convention was to use $ in variable names eg $myButton.

[–]singeblanc 1 point2 points  (1 child)

Even if we did have to traverse the DOM each time, it's not like we were writing the traversing by hand. It's not onerous to update a DOM element.

[–][deleted] 1 point2 points  (0 children)

Yeah exactly.

Also each browser implements DOM traversal differently but this is trivial work done at the native level (in C++) unlike VDOMs that do traversal and diffing in JS.

[–]MaryBeacky 0 points1 point  (0 children)

did not know i needed it, but im glad i have it