DOM Vs. innerHTML
There is quite a debate when using Ajax/DHTML on whether to use DOM nodes or innerHTML. I've been a follower of innerHTML, not only because it's easier, not only because you reuse the same view layer, but now also because it's indisputably faster.
When using an MVC architecture, it's easier to reuse partial UI's by rendering them as usual and injecting them into the page using innerHTML. That has been the philosophy of Rails, and mine when coding any Model-Glue / MachII project using Ajax.
Check out this benchmark and see for yourself...
http://www.robgonda.com/blog/trackback.cfm?725916E5-3048-7431-E41F5AD4E64376A5
There are no comments for this entry.
[Add Comment]