That said, I'm not criticizing the framework here, and I welcome new ideas, but a better choice of benchmark is sorely needed to be persuasive here.
Svelte – A UI framework that compiles into tiny standalone JavaScript modules
151–160 of 236 posts
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#152Looks neat, but also like a non-standard implementation of Web Components, which, though slow coming, already have universal browser support with a small shim. What's the advantage of this over something like Google's Polymer library, which is a toolkit for rapidly creating reactive web components?
Polymer is an enormous library.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#153Looks neat, but also like a non-standard implementation of Web Components, which, though slow coming, already have universal browser support with a small shim. What's the advantage of this over something like Google's Polymer library, which is a toolkit for rapidly creating reactive web components?
Shadow DOM lets you build reliable, reusable components.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#154Earlier quoted context omitted.
Tried to click the link, but the REPL is apparently so advanced that it won't even display the source code in Firefox.
The Svelte compiler uses some ES2015 features (for...of, etc) that aren't currently supported in all browsers. It's designed primarily for use in Node.
Why not transpile the Svelte compiler to ES5 so it will run on all browsers? Otherwise devs may get the impression Svelte generated applications will not work on all browsers.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#155Earlier quoted context omitted.
Polymer offers a lot of UI widgets, which are enormous when you glob them together, but the base polymer library is actually incredibly small due to the fact that's it's leveraging the browser's native custom element functionality. Can't reply to your comment so editing here: Works natively on IE11+, Edge, Safari 9+, Chrome, Opera, Firefox, and mobile browsers. The polyfill for everyone else (webcomponents-lite.js) i…
Ok, it has been some time since I checked. Don't you need lots of big polyfills ?
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#156Love it. I think the most discussion-worthy quote I found in the docs is this: > It's currently fashionable to avoid two-way binding on the grounds that it creates all sorts of hard-to-debug problems and slows your application down, and that a one-way top-down data flow is 'easier to reason about'. This is in fact high grade nonsense. It's true that two-way binding done badly has all sorts of issues, and that very la…
Similar things have been said about memory allocation in 'do whatever you want' languages like C++.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#157The precompilation is a nice idea, but I'm not buying the "vanilla JS" argument. The reason why React and other frameworks have a runtime is also because they optimize rendering. The Svelte doc says: every call to `component.set()` produces a synchronous DOM update. I can already see how this leads to very poor rendering performance in applications with a large number of nested components. React and the Virtual DOM s…
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#158I like the idea of abstractions that exist only in the source code and at compile time, and have zero runtime footprint. How does this compare to Google's Closure compiler and library? Does Svelte's compiler do anything that the Closure compiler cannot? Or how about running the source through a hygienic macro system like sweet.js and feeding the output of that to the Closure compiler? I ask because I'm skeptical of a…