News for hackers. Stuff that matters.
Re:Morphdom – fast and lightweight DOM diffing/patching (wit... by tracker1 on Tuesday August 18, 2015 @03:41AM (#10077987)
The virtual dom solutions can run outside, without a full DOM implementation, which are very slow and resource intensive on a server. Which is needed for client+server-side rendering options.
Re:Morphdom – fast and lightweight DOM diffing/patching (wit... by psteeleidem on Tuesday August 18, 2015 @11:54AM (#10079862)
You don't need a virtual DOM or real DOM on the server to render HTML. The fastest way to render pages on the server is to compile templates into JavaScript programs that produce an HTML string (not virutal DOM nodes and definitely not real DOM nodes) and you can use almost any HTML templating engine to do client+server side rendering. morphdom is only meant for use in the browser when you need to update the DOM based on new HTML/DOM nodes.
Re:Morphdom – fast and lightweight DOM diffing/patching (wit... by tracker1 on Thursday August 20, 2015 @10:36AM (#10092080)
True... but React offers a lot in terms of client-side components, and being able to re-use components outweighs having to use a lesser templating system and/or having to manage two rendering paths for each component. Beyond that, virtual DOM nodes aren't too different from an abstraction of rendering against a compiled template.