Hacker News new | past | comments | ask | show | jobs | submit login

You're right that the complexity derives from the DOM. But in my opinion the DOM isn't so much the problem as the fact that it is so hard to manipulate. There are two ways to manipulate it: by low-level node fiddling at a level far below that of the discrete UI elements being represented, or by deleting subtrees and replacing them from a serialized source (html), losing event handlers and embedded state in the process. Neither solution is usable when dealing with complex ui elements that have no corresponding html tag, so you end up needing an abstraction layer that implements of these mechanisms and does the boilerplate work to make it practical. Because of this abstraction layer things always get complicated as soon as you try to move beyond basic html tags with onclick handlers beause you end up learning the pseudo-dsl of the abstraction layer.

The long term solution is to make html itself extensible so you can define additional tags at the start of the page, with all the related logic, and then can go back to straight dom manipulation without needing any abstraction framework. This should become possible with web components and shadow dom, but we have a way to go still.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: