4 ms·
I don't know why you missed it, but it mentions both isomorphism (code that can be run client side or server side) and the virtual DOM (web components, etc...).
by ZenoArrow 12y ago
I don't know why you missed it, but it mentions both isomorphism (code that can be run client side or server side) and the virtual DOM (web components, etc...).
- rabbyte 12y agoCorrect me if I'm wrong but web components can use the native DOM without depending on a virtual DOM.
- ZenoArrow 12y agoNot as far as I know. What I can tell you is that web component polyfills like Polymer end up partially recreating the shadow DOM, and that's a lot of work, unlikely to have been undertaken unless it was necessary.
- brentvatne 12y agoThis is not mentioned in either the blog post or the docs, at least not easily findable with a cmd+f "Use some of the libraries on the server with NodeJS. i.e. DI." - some, and I'd expect an explicit mentioning of isomorphism if it were possible at the moment to render it on the server side. Shadow DOM != Virtual DOM. I mean the React-style Virtual DOM.
- ZenoArrow 12y agoWhat are the main differences between the shadow DOM and the virtual DOM?
- i_am_ralpht 12y agoShadow DOM is a DOM structure that's hidden under a tag (for example, the <video> tag has a Shadow DOM which provides the controls and timecode UI). Virtual DOM is (typically) a pure JavaScript object-based DOM representation that gets somehow flushed to actual DOM (or to WebGL or anything else). You as the programmer use the Virtual DOM directly and try to avoid talking to the real DOM underneath. Virtual DOM has a few advantages, but the one that stands out in today's browsers is limiting DOM thrashing where you query the DOM (requiring an expensive recalc) and then modify the DOM (invalidating what was recalc'd) in a loop.
- bronson 12y agoI missed it too. Got a link or something? Or do you mean the hint that some of the code can run server-side? That seems obvious, and is not in itself isomorphism.
- ZenoArrow 12y agoIn that case, we need to establish what isomorphism is. What's your definition?
- bronson 12y agoWe probably agree on what "isomorphism" is, but maybe not "support"? If a platform claims to support isomorphism, I expect it to render server-side with zero drama/workarounds/blog posts. Support means that producing fully-rendered html is a core part of the product and documentation, not something glued on the side or pieces to reassemble on your own. From the wording, it looks like Aurelia isn't there yet?