Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder if it's possible for browsers to start implementing this natively.

Have the browser make a shallow copy of the DOM and allow developers to manipulate the shallow copy. Then have a update() function that will take care finding the diffs and update the actual DOM. Seems like it would be much faster than a javascript implementation also.



At that pint you have now implemented a desktop UI styled API 'n the browser! I'm not against that by any means, I just think it's funny :)


This is exactly the goal. The DOM's strength was representing documents, not user interfaces. In this era of web apps, trying to use the DOM to build UIs is a massive pain. The web is really years behind in providing a native UI tool kit, and all of this DOM abstraction is just an attempt to paper over the real problem: The DOM is not good for building UIs.


> The DOM is not good for building UIs.

Funny, after years of Win32 C++, VB, and then web development, I find I can slap together an interface so much faster and better-looking using HTML/CSS/JS than anything for the desktop.

However, "slap together" may be the important phrase -- putting together a well-architected, consistent, extendable, etc. interface is perhaps a little hairier. But the DOM is great for building UI's quickly, with trivially easy custom styling and graceful resizing.


You're just seeing how bad C++ and VB are for UI work (by modern standards)


You just build UI's using the DOM? No abstraction libraries like jQuery? You've just won my "real programmer" award.


Technically jQuery normalized the DOM between browsers and added some stuff like QuerySelectorAll that is now standard so you don't really necessary need it anymore for anything.


Ah downvotes... I should know by now that nobody on the internet knows you're trying to make a joke unless you wrap your comment in <humor> tags.

And to the downvoters: My apologies for the offending you. I was simply trying to point out that the grandparent post is not comparing apples to apples, since it's very likely that he's achieving "fast" web development because he's either developing trivial user interfaces (i.e. not using anything that would require a layout manager, not required to support older browsers, etc.) or because he's using lots of other technologies in addition to the DOM (third-party javascript libraries, like jQuery, for example.)


I don't even have a monitor. I just have a keyboard with two buttons, one for 0 and one for 1. My brain is the compiler. My level of assuming what my binary will do is on another levle.

I'm the real programmer.


Yes, this I'm hoping this will happen over the next few years... this is how us web developers are going to escape DOM manipulation hell.




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

Search: